View source: R/ClusterStability.R
dunn_score | R Documentation |
This function returns the Dunn score (also known as the e Dunn index) of a partition .
dunn_score(X, labels)
X |
the input dataset: either a matrix or a dataframe. |
labels |
the partition vector. |
The Dunn index score for this data.
J. Dunn. Well separated clusters and optimal fuzzy partitions. Journal of Cybernetics, 4:95–104, 1974.
dunn_score(iris[1:10,1:4], c(3,2,2,2,3,1,2,3,2,2))
# Expected : 0.5956834
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.