cosine_dist | R Documentation |
Computes the cosine similarity between numeric vectors
cosine_dist(m)
m |
the data matrix |
Returns the cosine similarity
a <- c(2, 1, 0, 2, 0, 1, 1, 1) b <- c(2, 1, 1, 1, 1, 0, 1, 1) sim <- cosine_dist(rbind(a,b))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.