Description Usage Arguments Details Value Author(s) Examples
View source: R/r-utility-cosine.R
This function calculates the cosine of the angle between two numeric vectors. It is used in examples presented in the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R. See Appendix B or http://www.wiley.com/go/data_mining_algorithms for more details.
1 | cosine(v1, v2)
|
v1 |
a numeric vector |
v2 |
a numeric vecor |
The cosine of the angle between v1
and v2
is
calculated as their dot product divided by the product of their L2 norms.
The cosine of the angle between v1
and v2
.
Pawel Cichosz <p.cichosz@elka.pw.edu.pl>
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.