Learn R Programming

ClusterStability (version 1.0.4)

dunn_score: This function returns the Dunn_score.

Description

This function returns the Dunn score (also known as the e Dunn index) of a partition .

Usage

dunn_score(X, labels)

Value

The Dunn index score for this data.

Arguments

X

the input dataset: either a matrix or a dataframe.

labels

the partition vector.

References

J. Dunn. Well separated clusters and optimal fuzzy partitions. Journal of Cybernetics, 4:95–104, 1974.

Examples

Run this code
  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