Grey HTK Outline
Grey HTK Outline

Using machine learning for smarter segmentation

Defining the segments for a campaign or promotional offer is one of the most fundamental marketing tasks. But the traditional approach to segmentation isn’t all that effective…

It typically relies heavily on assumptions and trial-and-error. The marketer must determine – based on previous campaigns, limited data analysis, or business objectives – which customer attributes are most relevant for the campaign in question.

Unfortunately, that means the segments we come up with as marketers don’t always reflect the realities of our base; instead, they tend to be driven by the content of the campaign and the needs of the marketing team.

The thing is, natural segments exist within our customer data already – clusters of people grouped around particular characteristics, patterns in the way certain data points connect. And these are a much better reflection of the real needs and behaviours of our audience.

Of course, digging through all of your data manually to uncover these segments isn’t really feasible – which is where machine learning comes in.

Over the past year, our team has been hard at work developing machine learning models that can identify the existing segments within your customer data and bring them to the surface.

Today, one of our data scientists, Josh, is here to explain how our machine learning model works, why we’ve taken this approach, and how this can help marketers create smarter, more data-driven segments.

Building a model for segment discovery

To help uncover the segments in our audience, we need to build a model that can analyse customer data and identify those with enough in common to be considered a cluster. We also want to be able to dig into each cluster to understand what makes those customers distinct.

To do this, we start by calculating a set of properties (called features) from customer data that can be used to describe each customer in a high-dimensional Euclidean space. These features can represent almost any aspect of a customer including their purchasing habits, demographic information and loyalty behaviours, and are used to find groups of similar customers.

Let’s look at an example using two properties, the average tenure length and the number of tenures. For our purposes, a tenure is a period during which a customer is active, based on the frequency and value of their transactions. When a customer becomes inactive, they drop out of tenure; when they start to purchase again, a new tenure period starts.

You may notice that the data appears to be striped – this is because one feature is continuous (average tenure length) while the other is categorical (number of tenures). Sometimes we need to transform these features to improve the model’s performance, but in this case, it’s not needed as they have a similar scale.

In this example, there appear to be two distinct clusters, one (top-left) with a low number of tenures but high tenure length and another (bottom-right) with many, shorter tenures. This implies the existence of two segments in our customer base, one consisting of loyal customers and another consisting of customers that tend to shop around.

Spotting these clusters in a two-dimensional space like the one above is straight-forward, but what happens when we start to consider more properties and the number of dimensions increases, making the data harder to visualise? This is where we need to turn to machine learning.

In order to solve this problem, we tested a DBSCAN model which works by finding high-density regions in the data. Unlike many other clustering algorithms, this can find irregularly shaped clusters, deals well with noise and makes no assumptions about the number of clusters it expects to find.

This model has two parameters that work together to specify a minimum density of points required to form a cluster. The first parameter, Î, specifies a radius around a point, while another, n, specifies how many points need to be within that bubble for the target point to be considered part of a cluster core. 

The way this model works is fairly simple – it starts by selecting a random point and examining an area, defined by a radius, ε, around it.

If there are n points in that area, then the point is recorded as forming part of the core of a cluster and all points in the bubble become members of this cluster. This repeats until all of the points have been visited and are associated with a cluster or marked as noise. The result of this process is shown below.

The blue and teal lines represent the median of all the clusters and the median of the highlighted one, respectively, and the size of the circles represent the size of the clusters.

It’s important to note that these clusters aren’t based solely on the features above – a number of different attributes will have been used to group these customers together. Rather, this analysis is about helping us understand how these customers differ from the rest of the base.

A segment-first approach

So how might we apply this in practice? Let’s suppose a business has run their customer data through the machine learning model and identified a number of segments, based on features including average transaction value, number of tenures (periods of activity), average tenure length (how long the customer remained active), and loyalty points redeemed.

The model finds a large segment of customers with low transaction value, and frequent but short periods of activity, who have redeemed a lot of loyalty points. In other words, they aren’t spending much and they like to shop around – but they’re all about the points and rewards.

This suggests that a significant portion of the brand’s customers are more loyal to offers than to the brand itself. When it comes time to purchase, they’re driven by what discounts they can redeem, or any points promotions that might be running.

That tells the brand’s marketing team that this segment could do with some focused campaigns to increase their loyalty and value – maybe a brand-building campaign or a clever cross-sell offer that appeals to their love of promotions while boosting their basket value.

And suppose the model has identified another key segment – customers with high transaction value and long periods of activity, who have redeemed very few loyalty points. That suggests that the brand’s most valuable customers aren’t really engaging with the loyalty program or rewards.

A next step, then, might be a campaign to these customers highlighting the rewards available to them, or a survey to find out what they really want from the program.

By starting with real segments from their customer data, the marketing team can tailor the focus, message and format of each campaign to the relevant customers – rather than starting with a campaign idea and trying to find a segment that fits.

Taking the next step with ML-powered segmentation

The way we see it, machine learning really is the next step in customer segmentation. It enables marketers to build segments with confidence, by uncovering the attributes and patterns of behaviour that naturally group customers together.

But to be most effective, the machine learning model you use needs to deal with the data in the right way – not making assumptions about the number of clusters that might be there, able to spot irregularly shaped clusters and equipped to deal with noise.

So, if you want your marketing team to get started with ML-based segments, what’s the next step? Rather than trying to build something in-house, the best bet is to look for marketing software that already has machine learning built-in.

For an application like this, a custom solution isn’t really necessary. And by opting for a productised model, especially one that’s built in to your marketing or CX platform, you’ll save plenty of time – and empower your marketing team to identify segments themselves, without having to rely on IT or the BI team.

We’re in the process of incorporating our ML models into our Horizon platform – you can register your interest here and we’ll let you know when the new products have launched.

More accurate segments, more effective campaigns – and less time spent defining and building audiences. What’s not to love?

Subscribe to ITA Group Insights

Craving more content? Get the latest tips and trends from ITA Group on Customer loyalty and engagement right to your inbox.