pub fn dunn_index<F, S1, S2, D>(
x: &ArrayBase<S1, Ix2>,
labels: &ArrayBase<S2, D>,
) -> Result<F>Expand description
Calculates the Dunn index for a clustering
The Dunn index is the ratio of the minimum inter-cluster distance to the maximum intra-cluster distance. Higher values indicate better clustering.
§Arguments
x- Array of shape (n_samples, n_features) - The datalabels- Array of shape (n_samples,) - Predicted labels for each sample
§Returns
- The Dunn index