Predicting Individual Churn Periods of Users, or Unexpected Properties of Quantile Regression in Marketing Tasks

Dmitriy Borisov25 May 2024

Problem

Samokat.tech sends promo codes and pushes to customers who stop ordering, always on the same day X. Consumption cycles differ, so a single X fails both ways. Sent too late, it misses loyal customers who have already forgotten the service or moved to a competitor. Sent too early, it annoys customers with a long cycle and spends promo budget on people who would have ordered anyway. The business had no metric for the "right moment" and asked only for an extreme number of days that means churn.

Example from the article: a customer who orders once every 30 days and buys a lot at once is behaving normally, yet a fixed-day-X scheme can still send them a "come back" push and a promo code.

Solution in brief

Instead of predicting churn directly, the team predicts the range of a customer's normal gap between orders and treats going beyond its upper bound as churn. Quantile regression gives that bound without assuming a distribution: one gradient boosting model per quantile, with the 90th quantile chosen empirically as the threshold.

Questions this case answers
  • How to define and predict the moment an entity lapses from a repeated activity when each entity has its own skewed gap distribution and no ground truth exists
  • How to estimate each entity's normal inter-event interval and flag an event as overdue when it exceeds the upper bound of that interval, without assuming a distribution
  • How to predict each user's individual churn period to time retention promotions
  • How to define churn per user when purchase cycles differ widely

Tools and methods

  • Quantile regression with quantile loss — predicts a chosen quantile of days between orders per customer
  • Gradient boosting (CatBoost, XGBoost, LightGBM) — built-in quantile loss, one model per quantile
  • Darts — time series library that also implements quantile loss
  • RFM segmentation — the same forecast is reused with a different loss function
Continue reading — it's free

Google or a one-time email code. No password.