similarities | R Documentation |
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.
sim2(x, y = NULL, method = c("cosine", "jaccard"), norm = c("l2",
"none"))
psim2(x, y, method = c("cosine", "jaccard"), norm = c("l2", "none"))
x |
first matrix. |
y |
second matrix. For |
method |
|
norm |
|
Computes the similarity matrix using given method.
psim2
takes two matrices and return a single vector.
giving the ‘parallel’ similarities of the vectors.
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
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.