Statistical note
Clustering metrics: silhouette, ARI, and mutual information
Internal versus reference-based cluster evaluation, geometry assumptions, chance correction, and phenotype discovery.
For sample , let be its mean distance to its own cluster and the smallest mean distance to another cluster. Its silhouette is
which lies between and . It favors compact, separated clusters under the chosen distance.
from sklearn.metrics import (
silhouette_score, adjusted_rand_score,
normalized_mutual_info_score, v_measure_score,
)
X = [[0, 0], [0, 1], [5, 5], [5, 6], [9, 1], [9, 2]]
clusters = [0, 0, 1, 1, 2, 2]
reference = [1, 1, 0, 0, 2, 2]
print(silhouette_score(X, clusters))
print(adjusted_rand_score(reference, clusters))
print(normalized_mutual_info_score(reference, clusters))
print(v_measure_score(reference, clusters))
Case study: cell phenotypes
Silhouette uses feature-space geometry and needs no labels. Adjusted Rand index compares pairs of assignments against reference labels and corrects for chance. Mutual-information metrics quantify shared information but differ in normalization.
High internal separation does not prove biological reality. Check stability across resampling, batches, feature choices, and donors, then connect clusters to independent measurements.
Functions: sklearn.metrics.silhouette_score, adjusted_rand_score, normalized_mutual_info_score, homogeneity_completeness_v_measure, and davies_bouldin_score.