Evaluating a clustering result means answering a fundamentally different question than supervised evaluation — there's no ground truth to check against, so "quality" has to be measured from the clusters' internal structure, or checked against external labels only when they happen to exist.
Two Families of Evaluation Metrics
| Type | Requires Ground Truth? | Examples |
|---|---|---|
| Internal metrics | No — uses only the clustering result and the data itself | WCSS, Silhouette Score |
| External metrics | Yes — compares clusters against known true labels, if available | Adjusted Rand Index, Normalized Mutual Information |
External metrics are only usable when you happen to have true labels for validation purposes (common in research/benchmarking, rare in real unsupervised applications — if you had the labels, you might not need unsupervised learning in the first place). In practice, internal metrics are what you'll use most.
Within-Cluster Sum of Squares (WCSS)
Already covered as K-Means' own training objective in K-Means — lower WCSS means tighter clusters, but as discussed in the Elbow Method, it always decreases with more clusters, so it's used to compare different values of k, not as an absolute quality score.
Silhouette Score — The More Complete Picture
Unlike WCSS, silhouette score accounts for both how tight clusters are internally and how well-separated they are from each other — see that note for the full formula and worked example.
A Simple Sanity Framework
from sklearn.cluster import KMeans
from sklearn.metrics import silhouette_score
import numpy as np
X = np.array([[2,2],[2,4],[2,6],[8,2],[8,4],[8,6]])
for k in range(2, 5):
model = KMeans(n_clusters=k, random_state=42, n_init=10)
labels = model.fit_predict(X)
print(f"k={k}: WCSS={model.inertia_:.2f}, silhouette={silhouette_score(X, labels):.3f}")
# A good k typically shows: WCSS with a clear elbow, AND a high (close to 1) silhouette score --
# when the two metrics disagree, investigate further rather than trusting either blindly
The Human Check — Just As Important As Any Metric
A clustering result can score well numerically while still being useless in practice — e.g. clusters that are statistically well-separated but don't correspond to anything a business team can act on. Always pair internal metrics with a qualitative review: what does each cluster's "typical member" actually look like, and does that grouping make sense given domain knowledge?
Practical Use Cases
- Choosing between candidate values of \(k\), or between entirely different clustering algorithms, on the same dataset
- Detecting when a clustering result is likely unstable or poorly separated before presenting it to stakeholders
Common Mistakes
- Relying on a single metric in isolation — WCSS and silhouette score sometimes disagree, and both should factor into the decision.
- Skipping the human/business sanity check entirely, trusting only numeric scores.
- Using external metrics (which require ground truth) as if they were available in a genuinely unlabeled, real-world clustering problem.
Interview Relevance
Q: "How would you convince a skeptical stakeholder that your clustering result is meaningful?" Combine a quantitative case (elbow/WCSS trend, a reasonably high silhouette score) with a qualitative one — concretely describing what distinguishes each cluster in business terms, and showing the grouping aligns with something the stakeholder already intuitively recognizes.
Practice Question
A clustering result has excellent WCSS but a near-zero silhouette score. What might this combination suggest about the resulting clusters?