Cluster validity index based on nearest neighbours as defined in Liu et al. (2013) with a correction explained in Halkidi et al. (2015).
cvnn(d=NULL,clusterings,k=5)
dissimilarity matrix or dist
-object.
list of vectors of integers with length =nrow(d)
;
indicating the cluster for each observation for several clusterings
(list elements) to be compared.
integer. Number of nearest neighbours.
List with components (see Liu et al. (2013), Halkidi et al. (2015) for details)
vector of index values for the various clusterings, see Liu et al. (2013), the lower the better.
vector of separation values.
vector of compactness values.
Halkidi, M., Vazirgiannis, M. and Hennig, C. (2015) Method-independent
indices for cluster validation. In C. Hennig, M. Meila, F. Murtagh,
R. Rocci (eds.) Handbook of Cluster Analysis, CRC
Press/Taylor &
Francis, Boca Raton.
Liu, Y, Li, Z., Xiong, H., Gao, X., Wu, J. and Wu, S. (2013) Understanding and enhancement of internal clustering validation measures. IEEE Transactions on Cybernetics 43, 982-994.
# NOT RUN { options(digits=3) iriss <- as.matrix(iris[c(1:10,51:55,101:105),-5]) irisc <- as.numeric(iris[c(1:10,51:55,101:105),5]) print(cvnn(dist(iriss),list(irisc,rep(1:4,5)))) # }