| similarities {text2vec} | R Documentation | 
Pairwise Similarity Matrix Computation
Description
sim2 calculates pairwise similarities between the
rows of two data matrices. Note that some methods work only on sparse matrices and
others work only on dense matrices.
psim2 calculates "parallel" similarities between the rows of two data matrices.
Usage
sim2(x, y = NULL, method = c("cosine", "jaccard"), norm = c("l2",
  "none"))
psim2(x, y, method = c("cosine", "jaccard"), norm = c("l2", "none"))
Arguments
| x | first matrix. | 
| y | second matrix. For  | 
| method | 
 | 
| norm | 
 | 
Details
Computes the similarity matrix using given method.
psim2 takes two matrices and return a single vector.
giving the ‘parallel’ similarities of the vectors.
Value
sim2 returns matrix of similarities between each row of
matrix x and each row of matrix y.
psim2 returns vector of "parallel" similarities between rows of x and y.