cos2dis {EnvNJ} | R Documentation |
Converts cosines values into dissimilarities values.
cos2dis(cos)
cos |
a square upper triangular matrix where cos(i,j) is the cosine between the vector i and j. |
Cosines are standard measure of vector similarity, and can be converted into distance by dij = -log( (1 + cos(i,j) )/2).
A triangular matrix with the distances.
vcos()
data(bovids) vectors = otu.space(bovids[, 7:11]) cosData = vcos(vectors) disData = cos2dis(cosData)