powered by
Computes the 'variation of information' distance of Meila (2007) between two clusterings/partitions of the same objects.
vi.dist(cl1, cl2, parts = FALSE, base = 2)
vectors of cluster memberships (need to have the same lengths).
logical; should the two conditional entropies also be returned?
base of logarithm used for computation of entropy and mutual information.
The VI distance. If parts=TRUE the two conditional entropies are appended.
parts=TRUE
The variation of information distance is the sum of the two conditional entropies of one clustering given the other. For details see Meila (2007).
Meila, M. (2007) Comparing Clusterings - an Information Based Distance. Journal of Multivariate Analysis, 98, 873 -- 895.
arandi
# NOT RUN { cl1 <- sample(1:3,10,replace=TRUE) cl2 <- c(cl1[1:5], sample(1:3,5,replace=TRUE)) vi.dist(cl1,cl2) vi.dist(cl1,cl2, parts=TRUE) # }
Run the code above in your browser using DataLab