View source: R/CosinusDistance.R
CosinusDistance | R Documentation |
Calculates the cosine distance
CosinusDistance(Data)
Data |
[1:n,1:d] matrix with n cases, d variables |
https://en.wikipedia.org/wiki/Cosine_similarity
Distance |
[1:n,1:n] symmetric matrix, containing the distanes of the cases (rows) for the given data |
The cosine distance is calculated by calculating the cosine similarity d(i,j)=\max{s}-s(i,j)
, where s
is the cosine similarity and the d
the cosine distance.
Michael Thrun
data(Hepta)
distMatrix = CosinusDistance(Hepta$Data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.