Customer Segmentation with Clustering
K-Means and hierarchical clustering of 68,300 retail customers, published as a learning exercise with its limitations stated.
The Challenge
K-Means and hierarchical clustering were tested on 68,300 retail customers; silhouette scores of about 0.25 showed the customer groups overlap heavily rather than forming distinct segments.
Marketing teams want customer groups they can target differently. The task was to build customer-level features from transaction data, choose a number of clusters and judge whether the resulting segments are distinct enough to act on.
Approach
Results
The elbow plot suggested five clusters and the silhouette score preferred two, and neither shows clear separation. One cluster held about two-thirds of customers, so the five-cluster solution does not yet give segments a marketing team could target with confidence.
What I would fix: the profit ("CLV") feature was inflated by merging a customer-level value onto every order line before summing, and the final K-Means ran on unscaled features, so large-valued features dominated. Correcting both and re-running is the next step before naming any segments.
How it was tested
- Elbow method and silhouette scores for k = 2 to 10, with K-Means and agglomerative clustering.
- PCA and t-SNE projections used to inspect how well the clusters separate.
- The profit ("CLV") feature was inflated by merging a customer-level value onto every order line before summing.
- The final K-Means ran on unscaled features, so large-valued features dominated.
- Silhouette scores of about 0.25 showed the groups overlap heavily; one cluster held about two-thirds of customers.
- Both issues need correcting and a re-run before any segments are named.