Boost your marketing strategy with RFM
Okay, now that we combined these features into one dataframe, let’s visualize it! (code link)

This is nothing but a huge mess of customer pile which begs the question:

How are we going to segment them?

Most data scientists try to answer this question by implementing K-Means clustering, which is basically a machine learning algorithm used for seperating data into clusters based on data points’ distance to each other: (https://stanford.edu/~cpiech/cs221/handouts/kmeans.html)

However, I am an advocate of a manual approach, since ML algorithms do not consider any industry-specific dynamics. Accordingly, I will follow two essential steps to ace this challenge:

1- Quantile Transformation and Ranking

In simple terms, a quantile is where a sample is divided into equal-sized subgroups. Quartiles are also quantiles; they divide the distribution into four equal parts. In this case, I seperated RFM values into 4 quartiles and simply labeled them based on their values. (very bad-bad-good-very good). This is what the dataframe transformed into:

2- Segmentation by RFM rankings

This is the part, where the business understanding comes into play. I wrote a python function with a bunch of ‘if-else statements’ to define segments based on their RFM rankings. For instance, I extracted a customer segment with ‘very good’ levels of F-M, yet ‘very bad’ level of R. This means that the customer was once very active and valuable but it’s been a long time since the latest transaction. Hence, the company needs to win this group back urgently! The below-stated function is my personal approach and one can finetune these classes based on different market dynamics.

And here we go! We successfully created our customer segments to efficiently design upcoming marketing strategies! An elegant treemap comes in handy in terms of reflecting the big picture: (code link)

Customer Treemap by Segments

Below, is an analysis of the recently created customer segments through R-F-M. Notice how each group has its own behavioral pattern and differentiates meaningfully.
['Kerim Birgun']
['Python', 'Data Science', 'Segmentation', 'Analytics', 'Marketing Strategies']