Beryl.
← All articles
Beryl Analytics Blog

Customer Segmentation With Machine Learning: From RFM to Behavioral Clusters

Most companies segment their customers, and most of those segments are built on intuition. Someone decided that high value means spending over a certain amount, that new means signed up in the last 30 days, and that everyone else is just everyone else. These hand drawn buckets are easy to explain and almost always too crude to act on. They lump together customers who behave nothing alike and split apart customers who should be treated the same.

Machine learning does not magically fix segmentation, but it lets the data describe the groups instead of forcing your assumptions onto it. This article walks the path from manual segments to RFM scoring to genuine behavioral clustering, and then to the part everyone underinvests in: turning segments into campaigns that actually move revenue.

Start with RFM before you reach for clustering

Recency, Frequency, and Monetary value, the RFM model, is the most reliable starting point in customer analytics, and it has earned that reputation. It scores each customer on three questions: how recently did they buy, how often do they buy, and how much do they spend. You rank customers into tiers on each dimension, usually quintiles, and combine the scores.

RFM is powerful because it is interpretable and it maps directly to action. A customer who scored high on all three last quarter but has gone quiet on recency is a churn risk worth saving. A customer with high frequency but low monetary value is a candidate for upsell. You can run RFM in a spreadsheet or a few lines of SQL, and it will outperform most intuition based segmentation immediately. We almost always recommend a team prove value with RFM before investing in heavier methods.

Where RFM runs out of road

RFM only sees three dimensions, all of them about transactions. It cannot tell you that a customer browses heavily but rarely converts, that they only buy on promotion, that they use one product feature obsessively and ignore the rest, or that their support history flags them as fragile. When the behavior that matters to your business lives outside recency, frequency, and money, you need more dimensions, and that is where clustering earns its place.

Move to behavioral clustering

Clustering algorithms group customers by similarity across many features at once, without you predefining the groups. The classic workhorse is k-means, which partitions customers into k clusters by minimizing the distance between each customer and their cluster center. It is fast, well understood, and a sensible default. But it comes with rules you cannot ignore.

How to choose the number of clusters

The most common question, and the one with no purely mathematical answer, is how many clusters to create. Two tools help. The elbow method plots how much within cluster variance shrinks as you add clusters, and you look for the point where adding another cluster stops buying you much. The silhouette score measures how well separated the clusters are, rewarding solutions where customers sit clearly inside their own group rather than near the border of another.

Use both, then apply judgment. The statistically optimal number of clusters is often useless in practice. If the math suggests eleven segments but your marketing team can realistically run campaigns for five, you do not have eleven segments, you have a reporting problem. The right number of clusters is the largest number you can act on differently, and rarely more than that. Segmentation that nobody can operationalize is an academic exercise.

Name your segments so people remember them

A cluster labeled "Cluster 3" will never change behavior inside your company. The step that separates analysis from impact is translating each statistical group into a human description rooted in its defining traits. Look at what makes each cluster distinct, the features where it sits far from the average, and name it for that. "Loyal high spenders," "discount driven occasional buyers," "engaged but low value," "at risk lapsing."

Good names carry a recommended action inside them. When a marketer hears "discount driven occasional buyers," they immediately know not to waste full price campaigns on that group. Naming is not decoration. It is the interface between the model and the people who will use it, and it determines whether the work gets adopted or filed away.

Activate segments in real campaigns

Segments only pay off when they change what you send, to whom, and when. Activation means pushing the segment assignment into the systems your teams actually use: the email platform, the ad audience builder, the CRM, the product onboarding flow. Each segment should map to a different treatment.

Then you measure. The whole point of segmentation is that different groups respond differently, so test treatments per segment and let the results refine the segments over time. Segmentation is not a one off project. It is a living model you revisit as behavior shifts. Our team helps companies stand up this full loop, from the first RFM cut to activated, measured campaigns, and you can read more about how we approach it on our services page.

Takeaways

customer segmentationsegmentation machine learningRFM analysisbehavioral segmentation

Want analytics that actually moves the number?

Beryl Analytics builds predictive models, data pipelines, and dashboards that drive decisions for businesses across New Zealand and Australia. We ship to production and prove the return.

Talk to Beryl Analytics
© Beryl Analytics 2026. AI-powered data analytics for New Zealand and Australia.
Home  •  Blog  •  Terms  •  Privacy