powered by
This function returns the Dunn score (also known as the e Dunn index) of a partition .
dunn_score(X, labels)
The Dunn index score for this data.
the input dataset: either a matrix or a dataframe.
the partition vector.
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
Run the code above in your browser using DataLab