Skip to main content

Module 10 — Project: a documented customer segmentation

Nine modules of tools; this last one puts them to work on the most common use case in unsupervised learning. The goal is not to obtain groups — any algorithm produces those — but to obtain segments the business will actually use. The difference lies almost entirely in the workflow.

Step 1 — Frame before computing

The first question to ask is not "which algorithm?" but "segmenting to do what?". A segmentation intended for marketing campaigns, another to anticipate churn, a third to size a support team will not retain the same variables and will not produce the same groups. There is no universal segmentation, only segmentations fit for a decision.

Two requirements follow immediately: a number of segments compatible with action (four differentiated treatments are operable, fifteen are not), and the refusal of any variable unavailable at the moment of acting — a direct echo of the framing rule from the supervised course.

Step 2 — Choose and prepare the variables

This is where the result is won or lost, far more than in the choice of algorithm. The RFM framework is the proven basis in customer work: recency (date of last purchase), frequency (number of purchases), monetary value (average or cumulative basket). You enrich it according to use — tenure, category diversity, preferred channel, return rate.

Three decisive precautions:

  • standardize, without exception — the lesson of module 1, on pain of the widest-ranging variable deciding the groups by itself;
  • handle strongly skewed distributions: monetary amounts typically follow a long-tailed law, and a logarithmic transformation prevents a handful of very large customers from dictating the whole structure;
  • limit redundancy: ten variables measuring the same thing count it ten times. A PCA (module 6) both decorrelates and reduces, which improves the clustering that follows.

Step 3 — Compare several methods

No method dominates a priori; you try several and compare. An effective progression:

  1. k-means as the reference, with kk explored via elbow and silhouette (modules 2 and 3);
  2. hierarchical clustering on a sample, to read the structure in the dendrogram and check the presumed kk (module 4);
  3. Gaussian mixture if the segments look unequal in size or shape, with selection by BIC (module 9);
  4. DBSCAN if you suspect irregular shapes or want to isolate atypical profiles (module 5).

The selection criterion combines what the course established: silhouette score, stability under resampling and seed change, and interpretability of the resulting groups.

Step 4 — Characterize the segments: the heart of the work

A column of cluster numbers has no value; characterization is what creates use. For each segment, establish: its size and relative weight; the average profile of each variable, compared with the overall average; the salient deviations that distinguish it; and a meaningful name — "young frequent buyers, small basket", "large dormant customers".

These deviations from the overall average are the essential material: they say how the segment is specific, and therefore what to offer it. A segment you cannot manage to name is a warning signal — either the variables are poorly chosen, or the number of groups is too high.

Step 5 — Validate, document, maintain

Validation is business first and foremost: present the profiles to those who know the customers and listen for whether they recognize their reality. A frank disagreement is more instructive than a good silhouette score.

Documentation must make the result reproducible and contestable. It records the segmentation's objective, the list of variables and their transformations, the method retained and the alternatives discarded with the reason, the scores obtained, the named profiles and the known limits.

Finally, a segmentation ages: behaviors evolve, the customer base renews itself. So plan a periodic review and monitor segment sizes, whose drift signals it is time to start again.

Two classic pitfalls

The segmentation that stays in the notebook: technically impeccable, never used, for want of having been framed with those meant to exploit it. Frame it at step 1 with them, not afterwards. The over-fine segmentation: twelve top-scoring segments whose treatment nobody can differentiate. Four actionable segments are worth more — the constraint of use outranks the statistical optimum.

Summary

  • Frame the use first: the segmentation depends on the decision it must serve, and the number of segments must stay actionable.
  • Choosing and preparing the variables (RFM, standardization, transforming skewed distributions, reducing redundancy) matters more than the algorithm.
  • Compare several methods and decide on silhouette, stability and interpretability.
  • Characterization (profiles, deviations from the average, names) creates the value; validation is business-led, and the segmentation is documented and reviewed periodically.

Final step: the recap and the 40-question exam validating the whole course.