Description Usage Arguments Examples
View source: R/cosine_similarity.R
Computes cosine similarity between two vectors.
1 | cosine_similarity(x, y)
|
x |
A vector of numbers. |
y |
Another vector of numbers, of the same length as x. |
1 2 3 | x = c(3,0,0,2)
y = c(0,2,0,1)
cosine_similarity(x, y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.