Description Usage Arguments Details Value
Fast calculation of cosine similarity between rows of two matrices
1 | frow_cos_sim(x, y)
|
x |
numeric matrix of dimension |
y |
numeric matrix of dimension |
this code divides x * y.t()
by the row-wise norms of both x
and y
. If the norms get extremely small, the results might be numerically unstable. Use at own risk.
matrix of dimension n
times m where the (i,j)th element is the cosine similarity between the ith row of x
and the jth row of y
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.