MODULE 12 · Middle-track · 2 hours

A cluster without a name is not a result

There are no labels here and no correct answer. Segmentation quality is measured by whether marketing can do something different with each segment tomorrow.

Open this module in the simulator All 23 lessons

The first two modules are free, no card. The rest are $20/month.

🏢 The situation

Max is preparing next year's strategy:

"Marketing splits customers into 'new' and 'old' — that's the stone age. I want to know what customer types we really have, to build different products and communications. There are no labels — nobody knows the 'correct' segments. Is this possible?"

Lena:

"This is unsupervised learning. There is no target and no 'accuracy': segmentation quality is measured by whether the business can use it. Build RFM features, cluster, and above all — describe the segments in words. Clusters without interpretation are garbage."

🎯 Your task

  1. Understand K-Means: how it works, how to pick the number of clusters.
  2. Prepare features for clustering (scaling is critical!).
  3. Interpret the segments and hand them to the business.

📚 Theory

K-Means in 4 steps

  1. Pick K random centers.
  2. Assign every point to the nearest center.
  3. Recompute the centers as the means of their points.
  4. Repeat 2–3 until convergence.

Properties: fast, simple; finds convex clusters of roughly equal size; sensitive to feature scale and outliers; the result depends on initialization (cured by n_init=10, k-means++).

K-Means: points gravitate to the nearest center "Dormant" "VIP" "Discount hunters" ✕ — the centroid: the segment's "average portrait"
Each point is a customer in RFM feature space. K-Means finds the dense groups; naming and interpreting a segment is the analyst's job.

How to choose K

Scaling is not optional

K-Means measures Euclidean distance. If "revenue" is in thousands and "purchase frequency" in single digits, clustering collapses to revenue. StandardScaler is mandatory; log-transform skewed money amounts.

RFM — the classic of customer analytics

Plus behavioral: share of discounted purchases, category diversity, average basket.

Alternatives to K-Means


What to remember

  • Unsupervised = no target; quality = business usefulness + stability.
  • K-Means requires scaling; K is chosen by elbow/silhouette and common sense.
  • Log-transform money, standardize everything.
  • A cluster without a name and an action is not a result.

Next in this module: Practice

Open the module →

Nearby lessons

11 Fraud: 1 fraudster per 1000 honest users 13 "Frequently bought together": recommendations

The whole program — 23 lessons