Calculates the Dunn Index for a given clustering partition.
The distance matrix (as a matrix object) of the
clustered observations. Required if
An integer vector indicating the cluster partitioning
The data matrix of the clustered observations. Required if
The metric used to determine the distance
matrix. Not used if
The Dunn Index is the ratio of the smallest distance between observations not in the same cluster to the largest intra-cluster distance. The Dunn Index has a value between zero and infinity, and should be maximized. For details see the package vignette.
Returns the Dunn Index as a numeric value.
The main function for cluster validation is
users should call this function directly if possible.
Guy Brock, Vasyl Pihur, Susmita Datta, Somnath Datta
Dunn, J.C. (1974). Well separated clusters and fuzzy partitions. Journal on Cybernetics, 4:95-104.
Handl, J., Knowles, K., and Kell, D. (2005). Computational cluster validation in post-genomic data analysis. Bioinformatics 21(15): 3201-3212.
For a description of the function 'clValid' see
1 2 3 4 5 6 7 8 9
data(mouse) express <- mouse[1:25,c("M1","M2","M3","NC1","NC2","NC3")] rownames(express) <- mouse$ID[1:25] ## hierarchical clustering Dist <- dist(express,method="euclidean") clusterObj <- hclust(Dist, method="average") nc <- 2 ## number of clusters cluster <- cutree(clusterObj,nc) dunn(Dist, cluster)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.