Problem
A free-to-play mobile game earns from in-game purchases, so every player who leaves costs revenue. The team has a log with one row per level played and wants to flag players who will stop playing. Churn means no play for more than 2 weeks. The target is rare: 63 of the first 10,000 rows (0.6%) are churners, so a model that always predicts "stays" is right 99.4% of the time. A model trained on the raw rows ranks players poorly.
Example from the article: 789,879 level-play rows from a gaming company's mobile app.
Solution in brief
Judge the model by ROC AUC, not accuracy, then replace single-row features with per-user history over the last 1, 7 and 14 days. This lifts ROC AUC from 0.675 to 0.918. Permutation importance shows which signals drive the score.
Questions this case answers
- How to predict which users will leave within a fixed horizon when the raw log has one row per event and positives are very rare
- How to build per-user history features from an event log without leaking future observations into the model
- How to predict which players of a free-to-play mobile game will stop playing, from level-by-level event logs?
- How to choose a metric and a threshold for a churn model when only 0.6% of rows are churners?
Tools and methods
- Rolling-window features per user — sums, counts, ratios and averages of past rows in 1-, 7- and 14-day windows
- ROC AUC as the optimization metric — threshold-independent and usable under heavy class imbalance
- AutoGluon (via the Actable AI platform), best model LightGBM in the first run — trains several models and picks the best
- Permutation importance and Shapley values — show which features matter
- ChatGPT — suggests feature ideas
Google or a one-time email code. No password.