Using time series forecasting for predicting Freska's customer churn

Photo by Jake Hills
author

This is a real-life case example of using time series forecasting to predict customer churn for a high growth startup. Freska is a Nordic success story disrupting the cleaning industry.

Predicting customer churn is relatively simple when using snapshot data. Within Python, you could set up a predictive model to predict future customer churn based on the characteristics of customers that have churned in the past. However, if you want to predict churn from time series (that is from customer lifecycle data), the prediction becomes more tricky.

Another option for doing the prediction over a time series would be creating a neural network model. This model might work for starters but would set problems once you want to incorporate new or more complex data later on. It’s not scalable. Also, the neural network only predicts the churn, but it couldn't explain what factors are indicators for their probably churn.

Aito’s predictive database, except for doing the predictive part, will also return explainable results - as in, giving you the reason why a certain customer might be churning. The reason could be because the customer satisfaction ratings are low, or in case of a service business, there could have been too many changes in who is taking care of their case. Having these explainable results will help the company not only to anticipate but also to decrease the churn rate – thanks to explaining the underlying reasons behind the important numbers.

And we’re not stopping there. By amending the data with data about actions taken in order to retain the customer, the Recommend API endpoint could also be used to recommend the most suitable action to prevent a possible churn. As you might now realize, it’s not snapshot data Aito uses – it’s the whole database.

Customer case: predicting churn for Freska

Freska, a modern home cleaning company based in Finland, Sweden and Norway, have been using an RFM (recency, frequency & monetary) model to predict its customer churn so far. To reach a better churn rate prediction accuracy, Freska started a POC (proof of concept) with Aito’s predictive database.

Let’s look at the different steps involved in setting up churn prediction with Aito.

1. Collecting the data

For this POC, we use 2 different data sources:

a. Customer bookings, which contains:

  • Address information: Postcode, City, Country
  • Booking details: Worker, Duration, Frequency, Canceled, if the cleaning place hasdogs, hascats, hasotherpets, PetsInfo, cleaning area, notes
  • Satisfaction metrics: RatingOverall, RatingBehavior, RatingQuality, RatingOnTime, ApprovedByCustomer
  • Marketing information: SalesAgents, SalesAgency

b. Monthly customer metrics data, containing:

  • Number of months from first booking, total booking hours this month
  • A field that is manually entered telling if the customer churned this month (True, False)

2. Preprocessing the data

a. We aggregate the bookings data table and the customer metrics data table into 1 table so that the monthly information (metrics and bookings) of a customer is merged.

The combined table looks like this:

idmonthtotalHoursbookingHourschurnStatus
0152 3True
1021 1False
...............

b. Aito does not natively support time-series format. So in order to use the different monthly data points, we do another aggregation so each customer will only have one entry. The table now has more columns to store the status of the previous x month, and now looks like this:

idtotalHoursThisMonthtotalHours1MonthAgobookingHoursLastMonthbookingHours1MonthAgochurnStatusThisMonthchurnStatus1MonthAgo
0522 31 1TrueFalse
1442 22 2FalseFalse
.....................

Prev0month is the information of the previous month (comparing to the predicting month). Prev1Month is the information of the previous 2 months E.g: Predicting July, Prev0Month = June, Prev1Month = may

3. Using the predict api endpoint

We can now use Aito Predict query to predict the churn status next month of customer with id 0:

{
  "from": "trainingData",
  "where": {
    "totalHoursThisMonth":  "5",
    "bookingHoursThisMonth": "2 3",
    "churnStatusThisMonth": true,
    "totalHours1MonthAgo": "2",
    "bookingHours1MonthAgo": "1 1",
    "churnStatus1MonthAgo": false,
  },
  "predict": "churnStatusNextMonth"
}

As Aito uses all the data in the table as training data, it means it uses also the “churnStatusThisMonth” column values for inference. We solve this by using the data of the previous months but giving Aito the churn status of this month. And as such, using the information from the latest month to predict the next month.

Next steps

The POC started a couple of weeks ago and the upcoming weeks will be used for further experimentation and iteration. Maximizing churn rate prediction accuracy, improving, maybe adding the RFM model’s intelligence, even adding other data sources like the company’s action data (e.g. marketing & sales information) to see how it affects the results.

These next steps will be covered in a forthcoming blog post. Follow us on Twitter to be the first one to know. If you don't want to wait, book a demo and we explain how to do the same for your company.

Back to blog list

New integration! Aito Instant Predictions app is now available from Airtable Marketplace.

Address

Aito Intelligence Oy

c/o Innovation Home

Toinen Linja 14

00530 Helsinki

Finland

VAT ID FI28756352

See map

Contact

COVID-19 has driven us all to work remote, please connect with us online. Stay safe & play with data!

About usContact usPartner with usJoin our Slack workspace

Follow us