View source: R/clusterindexes.R
cvnn | R Documentation |
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)
d |
dissimilarity matrix or |
clusterings |
list of vectors of integers with length |
k |
integer. Number of nearest neighbours. |
List with components (see Liu et al. (2013), Halkidi et al. (2015) for details)
cvnnindex |
vector of index values for the various clusterings, see Liu et al. (2013), the lower the better. |
sep |
vector of separation values. |
comp |
vector of compactness values. |
Christian Hennig christian.hennig@unibo.it https://www.unibo.it/sitoweb/christian.hennig/en/
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.
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))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.