"All customers" is not a strategy.
A convenience chain that treats every shopper the same wastes its marketing budget. But the raw data — baskets, category spends, line items — doesn't hand you groups; it hands you thousands of rows of behaviour. The job was to find the natural seams in that behaviour and describe them in language a store manager would recognise.
The target was interpretability first: five segments, each with a plain "pen portrait" and a clear marketing recommendation — not a cluster diagram nobody can act on.
Retail spend is skewed. Model it as if it isn't and you cluster the outliers.
Rules for trustworthy segments.
Segments must be interpretable.
A cluster nobody can name is useless to a marketer. Every group needed a behavioural story, not just a centroid.
Handle skew honestly.
Retail spend and quantities are heavily skewed with fat tails. Winsorisation and log transforms stop a handful of big spenders from defining every cluster.
Let the data pick the K.
Five clusters were chosen against inertia and silhouette scores, not decided in advance for tidiness.
From four tables to five groups.
Four datasets — customer summaries, baskets, category spends, and line items — were joined into customer-level features, cleaned of skew, reduced with PCA, and clustered with K-Means.
Category spend became proportional preference features rather than raw pounds — so a light spender who buys mostly tobacco lands next to a heavy one with the same tilt, which is the behaviour marketing actually cares about.
One segment carries the value.
The five groups split cleanly: Core Grocery Shoppers with large, diverse baskets; Tobacco Convenience Buyers and Drinks & Tobacco Shoppers around focused convenience purchases; Cashpoint Users making small trips tied to cash withdrawals; and a very small Lottery-Focused group.
The recommendation followed the money: prioritise Core Grocery Shoppers for loyalty rewards and basket-building, use point-of-sale promotions for the tobacco and drinks segments, place impulse offers near the cashpoint, and run lottery-linked nudges for the last group.
A recommendation per segment.
Statistics don't move a marketing budget — recommendations do. Each cluster got a short statistical summary and a concrete action, so the deliverable read as a plan rather than a plot. That translation step is the part that makes segmentation worth doing.
Three things, next time.
Test soft clustering.
Some shoppers genuinely straddle segments; a Gaussian mixture would capture that overlap instead of forcing a hard assignment.
Add stability testing.
Re-running K-Means on bootstrapped samples would show how durable each segment really is before a team bets a campaign on it.
Tie segments to a value estimate.
Attaching a rough lifetime-value figure to each group would rank the marketing recommendations by expected return, not just intuition.