Clustering Evaluation & Silhouette Score
There are no labels to check against, so how do you know if your clusters are actually good?
Key Points
- Clustering has no labels, so traditional accuracy/precision metrics don't apply — evaluation needs different tools.
- Silhouette score ranges from -1 (badly clustered) to +1 (well-separated, tight clusters); near 0 means overlapping clusters.
- Computed per point, then averaged across all points for an overall score.
- The 'elbow method' is a separate technique used specifically to help choose k in K-Means, by plotting within-cluster variance against k.
- A high silhouette score doesn't guarantee the clusters are meaningful in a business sense — always sanity-check with domain knowledge.
What it is
Since clustering is unsupervised, there's no ground truth to compute accuracy against. The silhouette score measures how similar each point is to its own cluster compared to the next closest cluster, giving a single number between -1 and 1 that reflects how well-separated and cohesive the clusters are.
Why it exists
Without labels, it's tempting to just eyeball a 2D plot and declare clusters 'good,' which doesn't scale past two or three dimensions and is unreliable. Silhouette score and related metrics exist to give clustering a quantitative, repeatable way to compare different choices of k or different algorithms.
Intuition
Formulas
Silhouette Score for one point
a(i)— Average distance from point i to other points in its own clusterb(i)— Average distance from point i to points in the nearest neighboring clusters(i)— Silhouette value for point i, ranging from -1 to 1
When to use
- Use to compare different values of k and pick the one with the highest average silhouette score.
- Use alongside the elbow method for a more complete picture when choosing k in K-Means.
- Use to spot individual poorly-clustered points by examining low or negative silhouette values.
When not to use
- Do not use silhouette score as the sole justification for a clustering choice — it can favor round, well-separated clusters even when the true structure is different (e.g. DBSCAN-style irregular clusters).
- Do not compare silhouette scores across datasets with different scales without normalizing features first.
Common mistakes
- Picking k purely by maximizing silhouette score without checking if the resulting clusters make business sense.
- Forgetting that silhouette score is expensive to compute on very large datasets (pairwise distances).
- Confusing the elbow method's 'elbow point' selection with the silhouette score's numeric comparison — they're complementary, not identical.
In practice
Standard step after any K-Means or hierarchical clustering run — used to justify the chosen number of clusters and to catch cases where clusters are poorly separated before presenting results.
Was this concept helpful?
Related concepts