Not A Regular RFM Analysis
By: Nishant Mohan
Tags: Unsupervised Learning, Customer Segmentation, Cluster Analysis, Rfm Analysis

Background

There’s a specific part of job-hunting that I look forward to. It’s called take-home assessments. These assignments are a great way to learn about what you would do in the company on a typical day. As a data scientist, it gives me immense joy to take a sneak peak into what kind of data I’d be working with. It helps me judge a company’s attitude towards its data science initiatives too!

Towards the end of my master’s course, I started applying for jobs. One of the most interesting projects I did was from a gaming company.

Introduction

They asked me to perform customer segmentation for their in-game marketing campaign.

I was given a user level dataset and the attributes showed user’s purchase date for the base game, expansion packs and downloadable content of the game. That was it!

When I first saw the data, I thought, really? What can I do with merely these attributes!?

Turned out, more than I could initially think! Not only I figured a way of doing an RFM Analysis, I managed to take it up a notch. I call it Customer Segmentation 2.0!

Oh and, in case you didn’t know, RFM stands for Recency, Frequency and Monetary value. An RFM analysis is a generally accepted method for customer segmentation. For the purpose of this article, I would not dive into details of RFM analysis, as there are already many such resources available. My focus is to explain what I did for this particular project.

So let’s start, shall we!?

The Data

Let’s take a quick look at the available features.

Features in the Data (Image by Author)

So the last 8 features are the names of either an expansion pack of the game or a downloadable content. The dataset has 500k rows. That’s good because it means we can make more segments, right!?

The Methodology

I begin by studying the distributions or unique value counts of each of the feature. This helps me get familiar with the data. There are a lot of blanks in the data, considering not many players install an expansion pack or downloadable content. I replace such values with -1.

I translate all other dates to number of days passed since the game was launched. This makes the data numeric.

In other words, I convert all the install dates to numeric by counting number of days passed at the date of installing since the game was launched. That is, the days between install date and game launch date. This puts all the dates in perspective.

I tag the users as responders or non-responders based on whether they buy any add-on or not. For responders, I intend to use k-means clustering for segmentation.

Now I can begin defining my key metrics for segmenting the responders:

Recency (Chart by Author)

Recency

This is the number of days passed since the user was seen active on the gaming platform.

The chart shows that more users have been active in 2019, as compared to the users in 2017.

Frequency (Chart by Author)

Frequency

Since the day a player installed the game, how many days did he play the game?

The chart is concentrated towards left, meaning that most players are active for lesser days. However, it should be noted that new players have less number of days where they could be active, as compared to older players.

Monetary value (Chart by Author)

Monetary Value

Since this information is not available in the data, I went to the game store website and mapped the prices to the add-ons. This way, I now have the amount spent by each player. Neat, eh!?

Most players spend less than a hundred bucks. This is expected because the base game costs 55 bucks. And the downloadable content is generally cheap!

Responses (Chart by Author)

Responses

How many add-ons did the player buy previously? This will not be correlated with the monetary value, because the prices vary across add-ons!

It can be seen that most people who bought any add-on, only bought one.

Purchase Frequency (Chart by Author)

Purchase Frequency

Maybe the player buys everything together, or maybe he spreads it out?

While most players buy everything soon after they buy the game, we see other highs near 400 days and 800 days. Incidental? No! These bumps can be attributed to launch dates of the two expansion packs roughly every year.