Skip to content

Machine learningRetail

Customer Segments

Group a shop's customers by how recently, how often and how much they buy.

  • Clustering
  • k-means++
  • RFM
  • PCA

Segments

Finding segments…
5
It starts at the number with the best silhouette.

Thread & Loom's sample orders over 18 months. Use your own orders

Customers by segment

Choosing k

The segments

Averages per customer. Recency counts the days from the last order to the latest day in the data.

Customers

Select a segment above to list its customers here and pick them out on the chart.

Your own data

Export orders from your till or shop platform with three columns: who bought, when, and how much. I work out recency, frequency and spend for each customer, then find the segments in your browser.

The customers and orders in the sample are made up. With a shop's real orders I would refresh the segments every month, as people move between them when they buy or go quiet.

Things to try

  1. Change the number of segments and watch the silhouette score.
  2. Open a segment to see who is in it and what I would send them.
  3. Load your own CSV of orders, then export the segments.

Where I'd use it

  • Targeted campaigns
  • Loyalty tiers
  • Win-back lists

Want this on your own data? Tell me about your project.