Description Usage Arguments Value See Also Examples
Calculates the cosine distance of rows of a matrix.
1 | cosineDist(x)
|
x |
A matrix. |
Cosine distance as a dist object.
http://stackoverflow.com/questions/2535234/find-cosine-similarity-in-r
1 2 3 4 5 | rbind(c(1,1,1,0,0,0), c(0,0,0,1,1,1), c(1,1,1,0,0,1)) -> x
cosineDist(x)
1 2
2 1.0000000
3 0.1339746 0.7113249
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.