Recommended workflow
- Clean data and choose meaningful features.
- Scale variables when distance requires it.
- Fit a reasonable range of candidate k values.
- Compare elbow, silhouette, gap, and validation metrics.
- Test resampling and initialization stability.
- Inspect cluster sizes, profiles, and representative cases.
- Choose the simplest stable solution that remains useful.
Useful formulas
Silhouette: s = (b − a) / max(a, b), where a is within-cluster dissimilarity and b is nearest-cluster dissimilarity.
WCSS improvement: (previous WCSS − current WCSS) / previous WCSS × 100.
Common mistakes
Do not select the largest k merely because WCSS decreases. Do not trust one metric without checking cluster profiles. Do not ignore unstable or operationally unusable segments.