powered by
Computes pairwise distances between vectors.
vdis(cos)
a square upper triangular matrix where cos(i,j) is the cosine between the vector i and j.
A triangular matrix with the distances.
Cosines are standard measure of vector similarity, and can be converted into distance by dij = -log( (1 + cos(i,j) )/2).
vcos()
# NOT RUN { data(bovids) vectors = otu.space(bovids[, 7:11]) cosData = vcos(vectors) disData = suppressWarnings(vdis(cosData)) # }
Run the code above in your browser using DataLab