View source: R/signatures_utils.R
cos_sim | R Documentation |
Compute the cosine similarity between two vectors, using the formula sum(a*b)/sqrt(sum(a^2)*sum(b^2)).
cos_sim(a, b)
a |
first vector to compare |
b |
second vector to compare |
cosine similarity
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.