Clustering & Segmentation
Applied ML articles on forecasting, feature engineering, NLP, production ML, graph analytics, conformal prediction, label engineering, and decision-oriented modeling — from real projects at Sofrecom (Orange Wholesale), Tunisia Telecom, Kiota Intelligence, and Zindi.
Insights on clustering, segmentation, behavioral grouping, and unsupervised pattern discovery. Browse all insights in this category, or view all insights.
PCA Compresses. Interpretation Is the Value.
Three PCA components explained ~80% of standardised variance in a telecom behavioural example — useful, but not yet interpretable. A scree plot answers how many components to keep; loading patterns answer what they represent.
Result: Read the loadings to turn components into meaning: usage intensity, a voice–data contrast, and stability versus volatility. Component signs are arbitrary, so the relative pattern is what matters — and before PCA feeds clustering, validate stability, profile coherence, and downstream usefulness.
K-Means Reduces the Scale; Hierarchy Explores Structure
Hierarchical clustering gives useful nested structure but its memory and computational requirements grow quickly with the population. K-means scales easily but alone may not give the hierarchical interpretation the final segmentation needs.
Result: Use K-means with many centres to compress a large customer base into representative centroids, then run hierarchical clustering on those centroids to explore higher-level structure — and validate segment sizes, within-segment variation, stability, and centroid weights before trusting the result.
Customer Segmentation Is Designed, Not Discovered
A clustering algorithm can produce groups that are mathematically distinct — but business teams cannot act on Cluster 1, 2, 3. They need to know who the group is, how it behaves, and what treatment fits.
Result: The practical method is an iterative loop: represent, cluster, profile, rethink, rebuild — checking recharge patterns, voice/data mix, network behaviour and stability until each segment is actionable. Iteration is not extra work; it is the segmentation method.
From Cluster to Operational Segment: Assignment First
A discovered cluster is analytically interesting, but not operational until future customers can be assigned to it. The next step after unsupervised segmentation is to translate the pattern into explainable assignment logic.
Result: Feature profiling and interpretable conditions give teams a definition they can review, apply at scale, monitor over time and challenge when behaviour changes. Discovery identifies a pattern; operationalisation makes it usable.
One Row Is a Modelling Decision: Customer or State?
The hardest segmentation decision was not the clustering method — it was deciding what one observation means. One row per subscriber gives stable customer profiles; one row per subscriber-month captures behavioural states over time.
Result: Before asking which method, how many segments, or which distance metric, ask this first: do we need stable customer types or changing customer states? The observation unit decides what the clustering can learn.
When the Label Does Not Exist: Define the Behaviour First
Some ML projects begin before a target exists. In a telecom Multi-SIM project there was no column saying "this subscriber uses more than one SIM" — so the work started with a behavioural hypothesis, not a supervised workflow.
Result: Behavioural hypothesis → feature design across data domains → unsupervised discovery → profiling and validation → operational assignment. Clustering surfaces a pattern worth investigating, not confirmed truth; the output is an explainable, governable segment — the target is sometimes a discovery process, not a column.
K-Means is not always the segmentation. Sometimes it is the compression layer.
Hierarchical clustering can reveal useful, nested structure in customer data — but applied directly to millions of customers, it becomes computationally expensive very quickly. K-Means scales much better, but using it as the final answer too early flattens meaningful structure.
A practical two-stage pattern: K-Means compresses the population into representative centroids, then hierarchical clustering explores structure across those centroids.
Result: An algorithm does not always have to be the final model. It can prepare a feasible representation for the next layer.
Detecting households is not the same as detecting communities!
Started from precomputed communication communities (SAS CLA results). A communication community is not necessarily a household — it can contain extended family, multiple households, and close friends.
Combined two signals: ranked communication intensity (top contacts weighted by position) and shared dominant evening cell-tower usage. Same community + top-ranked contact + shared evening tower = household tie.
Result: In applied graph analytics, the first cluster is often not the real unit you care about.
Cell tower dominance is not just a demographic feature
In a telecom family-detection project, I needed to distinguish household-level ties from broader social communities. Added shared dominant cell-tower usage — "which cell tower shows up most in your evening CDR?" People spend ~8 hours a night in the same place.
Infrastructure data became behavioral evidence. The richest signals often hide in operational data, not in declared information.
Result: Cell tower dominance acts as a strong proxy for home location — operational traces as features.
Share on LinkedIn →