Using ML to Forecast CLTV

Anton Melnikov1 Nov 2023

Problem

A mobile operator needs to know how much margin each subscriber will bring over the next five years, because other teams use the forecasts to set KPIs and plan. The value is a sum of revenue and cost items that behave differently: some can be assigned to a subscriber, others only to a segment, and traffic costs change from year to year. One five-year model would be weak: tariffs, prices and the economy change the data over such a span.

Example from the article: A forecast made in January 2023 is built month by month up to December 2027, per customer rather than per phone number.

Solution in brief

Split CLTV into nine components and forecast them with eight CatBoost models (two classifiers for survival in the paid and active bases, six regressors). Each model covers horizons from 1 to 24 months, with the horizon passed as a feature. The 24-month forecast is later extended to five years.

Questions this case answers
  • How to forecast the long-term profit of each customer when value is a sum of revenue and cost components that behave differently and the data drifts over a multi-year horizon
  • How to train one model per target that predicts any horizon from 1 to N periods ahead without feeding it features from the future
  • How to keep many same-kind gradient boosting models trainable, validated and released together from one codebase
  • How to forecast customer lifetime value for every subscriber over a five-year horizon?

Tools and methods

  • CatBoost — classifiers (Logloss, AUC) and regressors (Huber, WAPE) for all eight models
  • Hash-based subscriber sampling — representative sample from tens of millions of subscribers, each used at most once
  • Pydantic configs and a shared Learner class — one codebase for eight models
  • MLflow, Argo Workflow, Docker, Spark on Hadoop — model registry, monthly scheduling, scoring
Continue reading — it's free

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