Tutorial#
This tutorial works through one problem from beginning to end: a telecom company wants to run a retention campaign, and needs to decide which customers to contact.
We use the Iranian churn dataset, which is well suited to value-driven modelling because every customer carries their own lifetime value. That makes the interesting question not “who is most likely to leave?” but “who is most profitable to keep?” — and those two questions have different answers.
Along the way you will see why a model with a good ROC AUC can still lose money, how to write a cost matrix that captures the campaign’s economics, how to train a model on it, and how to choose the threshold and validate the whole thing.
Note
Needs pip install empulse[optional] pandas. The dataset downloads once and is cached under
~/empulse_data.
Each page is self-contained: the first code block re-loads the data, so you can jump in anywhere.
If you only have five minutes, read the Quickstart instead.