Contents/ Part XXXI · Capstone Projects: Machine Learning/ Chapter 192

Churn Prediction and Who Is Worth Contacting

Capstone 30. Three model families land within a thousandth of each other on AUC. Changing which model wins is worth almost nothing. Changing what the list is sorted by is worth 376,000 dollars a year.

⏱️ ~24 min read
🎯 Explainability & uplift
📊 Chapter 192

A retention campaign reduced churn by a genuine, well-measured 5.7 percentage points and lost 159,000 dollars doing it. Nothing was wrong with the model. The list was sorted by the wrong thing.

The brief
Setting
One quarter of subscriber records from a meal-kit company: 23,641 accounts with tenure, order behavior, delivery quality, support contacts, ratings and app activity, plus the outcome of a randomized retention campaign.
The question
Who should be sent the offer next quarter? Not who is likely to cancel. Who will do something different because we contacted them.
Why it matters
A retained subscriber is worth 290 dollars of margin. The offer costs 30 dollars per account it is sent to, whether or not that subscriber was ever going to leave. Divide the two and the offer only pays for itself on somebody whose chance of canceling it lowers by more than 10.3 points.
What we do
Check the randomization, price the campaign as it was run, hold a three-model bake-off that turns out not to matter, use SHAP and LIME carefully enough to see what they do and do not claim, then fit an uplift model and compare two targeting rules on money rather than on accuracy.
A churn model answers who will cancel. A retention budget needs the answer to whose behavior we can change. Those are different orderings, and in this dataset they correlate at 0.34.
The finding, up front

Three model families land within 0.0009 of each other on AUC. Switching between them is worth almost nothing. Switching from a risk-ranked list to an uplift-ranked list is worth 376,000 dollars a year, and the highest-risk segment in the whole dataset, which cancels at 49 percent, loses money when you contact it.

1

Two Numbers Decide Everything

The retention team supplied both before any modeling started. A subscriber who stays is worth $290 of gross margin over the following year. The offer, 20 percent off the next three boxes, costs $30 per account it is sent to.

The clause that does the work

The credit lands on the account whether or not the subscriber was ever going to leave. So the $30 is a cost of targeting, not a cost of saving. Divide it by the $290 and you get the number the entire project turns on:

break-even uplift = 30 ÷ 290 = 10.3 percentage points

Contacting somebody is worth doing only if it lowers their chance of canceling by more than 10.3 points. Not if they are likely to cancel. If it changes whether they cancel.

That sentence quietly rules out the standard approach. A churn model estimates the first quantity and says nothing at all about the second.

2

Price What Already Happened

The campaign was randomized: half of all active subscribers, chosen by a coin flip on the account number, were sent the offer. Balance across the two arms is clean, with a largest standardized difference of 0.018 against a conventional threshold of 0.10. So the difference in churn between the arms is the causal effect of the offer, and no model is needed to read it.

Churn, offered
16.81%
n = 11,917
Churn, not offered
22.55%
n = 11,724
Effect of the offer
−5.74 pp
95% CI [−6.76, −4.73]
Net per account
−$13.34
−$158,998 in total

The campaign worked and lost money. Both halves of that sentence are true and neither is a criticism of the offer. It really did reduce churn, by an amount whose confidence interval is nowhere near zero. It is simply that 5.7 points of avoided churn buys $16.66 of margin, and the offer costs $30.

So the campaign does not need a better model or a better discount. It needs to be sent to fewer people, and the entire question is which ones.

3

The Bake-Off That Does Not Matter

The risk model answers "what is the chance this subscriber cancels if we do nothing", so it is fitted on the control arm only. Three families, same features, same split.

ModelROC-AUCPR-AUCBrier
Logistic regression0.81370.61300.13132
Random forest0.81460.61890.13390
Gradient boosting0.81450.61690.13056

A spread of 0.0009 in ROC-AUC across three quite different model families. There is nothing to choose between them, and a reasonable person would take the logistic regression for its transparency and stop.

Hold that thought. Model selection is where a great deal of project time goes, and by the end of this chapter a different decision will be worth a six-figure sum. It is not this one.

4

What a SHAP Importance Actually Measures

SHAP on the winning model gives a clean global ranking: tenure first, last rating second, skipped weeks third, delivery issues fourth. Support contacts sit near the bottom, tenth of nineteen.

Now remove one column, delivery_issues_90d, and refit.

Support contacts, full model
0.0311
mean |SHAP|, rank 10 of 19
With delivery issues removed
0.1784
rank 6 of 18, a 5.7× jump
ROC-AUC
0.8145 → 0.8073
the model barely noticed
Correlation between them
0.614
support calls follow bad deliveries

Nothing changed about how much support contacts matter to a subscriber. What changed is what they add, and that is what a SHAP importance measures. Support calls are largely caused by delivery failures; with the delivery column present there is little left for them to explain, and with it gone they stand in for it.

Two consequences, and the second is the expensive one

An importance ranking is a statement about this model with these columns. Add one, drop one, and it moves.

A high-ranking feature is not a lever. Read the second ranking and decide to reduce support contacts, and the cheapest way to do that is to make support harder to reach. The feature moves. The delivery failures stay exactly where they are.

5

SHAP and LIME, on the Same Subscriber

Both methods explain one prediction by assigning a contribution to each feature, and they are built on different ideas. SHAP allocates the prediction with a rule borrowed from cooperative game theory. LIME fits a simple local model to points sampled around the one you asked about. Nothing guarantees they agree, and on sixty mid-risk subscribers they name a different single most important driver 52 percent of the time.

One subscriber: 7 months, 2 delivery issues, 3 skipped weeks, rated 4, signed up on a discount
SHAP saysLIME says
delivery issues  +0.617tenure months  +0.144
autopay  +0.359delivery issues  +0.135
app logins  −0.291signup discount  +0.064
skipped weeks  +0.267autopay  +0.063

They agree this subscriber is at risk and they disagree about what to put at the top of the retention agent's screen. Neither is wrong. They answer slightly different questions, and both are descriptions of the model rather than of the subscriber.

That is the honest framing for a business audience: this is what the model responds to, not this is why the customer is leaving. The distance between those two sentences is the rest of this chapter.

6

The Question Nobody Asked the Model

Every number so far has been about who cancels. The offer only earns its $30 from people whose behavior it changes. Because the campaign was randomized we can estimate that directly: fit one model on the control arm and one on the offered arm, and the gap between their predictions is the estimated effect of the offer on that subscriber. This is the two-model, or T-learner, approach.

Risk and uplift
r = 0.34
Spearman 0.40
Negative uplift
18.6%
contact makes them likelier to leave
Delivery issues
+0.54 / −0.19
with risk / with uplift
Signup discount
+0.24 / +0.42
with risk / with uplift

Read the last two chips together. delivery_issues_90d is the clearest signal in the dataset for who cancels, and it points the other way for who to contact. That is not a quirk of the model. A subscriber whose boxes keep arriving late has a service problem, and 20 percent off the next three does not fix a service problem. Meanwhile signup_discount, sixth in the risk ranking, is the strongest single predictor of who responds.

Left: paired horizontal bars showing each feature's correlation with churn risk and with uplift. Delivery issues is plus 0.54 with risk and minus 0.19 with uplift; support contacts plus 0.37 and minus 0.18; last rating minus 0.59 and plus 0.10; signup discount plus 0.24 and plus 0.42. Right: four named segments as paired bars in percentage points, showing the churn rate if left alone against the churn the offer removes, with a dashed break-even line at 10.3 points. The dormant segment's second bar is negative at minus 8.4, the discount signups reach plus 13.2 above the line, the delivery-issues segment cancels at 49 percent but only plus 8.1 is removed, and the happy engaged segment is plus 7.0.
Left: four of these features change magnitude between the two columns and two of them change sign. Right: the tallest gray bar, the highest-risk segment in the dataset, sits above a red bar that does not reach the break-even line.
7

Two Targeting Rules, Priced

A targeting rule picks a set of accounts using features only. Because assignment was random, the offered and control accounts inside any such set are still comparable, so the value of a rule can be measured rather than modeled.

Contact the topRanked by churn riskRanked by uplift
churn avoidedvaluechurn avoidedvalue
10%12.53 pp$5,24425.55 pp$36,499
20%11.75 pp$6,73519.57 pp$44,261
30%12.26 pp$13,78816.59 pp$44,990
40%12.59 pp$21,51914.28 pp$37,794
50%11.29 pp$11,32012.09 pp$20,989
70%9.17 pp−$19,6799.68 pp−$11,138
everybody6.73 pp−$86,6366.73 pp−$86,636

Read the bottom row first: contacting everybody, which is what the campaign did, loses money on the test set, exactly as section 2 said it would. Then read across. At every depth the uplift ranking is worth more, and at the top of the list it is worth seven times more.

Best risk-ranked rule
$21,519
top 40%, 3,310 accounts
Best uplift-ranked rule
$44,990
top 30%, 2,483 accounts
Against the campaign as run
+$131,626
on 8,275 test accounts
Scaled to the base
$376,046
23,641 eligible accounts

Same data, same features, same model family, same three-model bake-off that made no difference. The only thing that changed is what the list is sorted by.

Left: a scatter of each subscriber's chance of canceling against the percentage points of churn the offer removes, with a dashed break-even line at 10.3 points. Points above the line are colored as worth contacting. A large cloud of high-risk subscribers sits well below zero, annotated as the delivery-problem group. The correlation is plus 0.34. Right: value against the share of subscribers contacted, with two curves. The uplift curve peaks near 45,000 dollars at 30 percent contacted; the risk curve peaks near 21,500 dollars at 40 percent; both fall to minus 86,636 dollars when everybody is contacted.
Left: if risk and response were the same thing this would be a diagonal band. It is not. Right: both curves are humped, both go negative, and the uplift curve is above the risk curve everywhere.
8

Four Segments, Four Different Answers

Quartiles of a model score are hard to hand to an operations team. These four groups can be written down in a spreadsheet, and each one is still a randomized comparison, so each number below is measured against its own control.

SegmentnCancel if left aloneChurn the offer removesValue per account
Dormant: long tenure, autopay, rarely logs in53713.2%−8.40 pp [−14.80, −2.01]−$54.37
Signed up on a discount3,40929.8%+13.16 pp [+10.36, +15.97]+$8.17
Two or more delivery issues1,32148.6%+8.09 pp [+2.73, +13.45]−$6.54
Rated 5, logs in regularly1,5099.7%+6.97 pp [+4.54, +9.39]−$9.80

The dormant group is the one to look at twice. Long tenure, on autopay, barely opens the app. They cancel less than anybody in the table, and sending them the offer made them more likely to leave, by 8.4 points, with an interval that does not include zero. The most likely explanation is the least sophisticated one: an email about a subscription is a reminder that the subscription exists. Every dormant account that was sent the offer cost about $54.

The delivery-issues group is the trap. They cancel at nearly 49 percent, which puts them at the very top of any risk-ranked list, and targeting them still loses about $6.50 an account. The offer does move them, by 8.1 points, and 8.1 is below 10.3.

The discount signups are the business case. They came in on a promotion, they skip weeks, they respond to a price. Nearly all of the recoverable value in this campaign is in this one group.

9

What to Watch

10

Uplift and Explainability in Data Science & AI

Where it appearsThe same distinction, in a different costume
Marketing and CRMWho buys against who buys because of the ad. The whole field of incrementality testing exists because the two get confused
MedicinePrognosis against treatment effect. A patient at high risk of a bad outcome is not automatically the patient a drug helps most
Credit and collectionsWho defaults against who responds to a payment plan, and the same trap: the highest-risk accounts often respond least
Public programsWho is most in need against who is most helped, which is a values question as much as a statistical one
Recommendation systemsWhat a user would have watched anyway against what the recommendation changed, the difference between a score and a lift
Where the research went

The four-way split used in section 8, persuadables, lost causes, sure things and sleeping dogs, comes from Radcliffe and Surry, who built the practical uplift literature out of direct-mail work in the 1990s and named the Qini curve. Rzepakowski and Jaroszewicz gave uplift decision trees their splitting criteria, and Künzel and colleagues set out the S-, T- and X-learner meta-learner family, of which the two-model approach used here is the simplest member. Athey and Imbens connected all of this to causal inference proper with causal forests and honest estimation. On the explanation side, Ribeiro and colleagues introduced LIME in 2016 and Lundberg and Lee introduced SHAP in 2017; Rudin argues that for high-stakes decisions the right response to both is to fit an interpretable model in the first place, which given the bake-off in section 3 is not an unreasonable position here.

🐍

The full project, step by step

The companion notebook computes the break-even before loading anything, cleans three faults out of the export, checks the randomization, prices the campaign as run, holds the bake-off, runs SHAP with and without a correlated column, puts SHAP and LIME side by side on the same subscriber, fits the T-learner, prices both targeting rules across every depth, and measures the four segments against their own controls.

📓 View Notebook (code & outputs) ▶ Open in Colab ⬇ View / Download on GitHub
Read the reports & get the data

The dataset (capstone-churn-prediction-explainability.xlsx) holds 24,380 subscriber records with a duplicated export block, a rating column that codes "never rated" as −1, accounts too new to have churned, the randomized campaign flag, and the agreed economics. Two written reports accompany it: a plain-language brief for the retention lead, and a technical report covering the bake-off, the explanation methods and the uplift evaluation.

🎓 Key Takeaways

  • The campaign worked and lost money. A real 5.7-point reduction in churn, against a break-even of 10.3, is $158,998 gone.
  • Three model families, 0.0009 of AUC between them. The bake-off was the least consequential decision in the project.
  • A feature moved five places when a correlated column was dropped, and the model got no worse. Importance is a property of the model.
  • Risk and uplift correlate at 0.34. Sorting by the second was worth $376,046 a year over sorting by the first.
  • The 49-percent-churn segment loses money when contacted, and one segment is made worse by being contacted at all.

Quiz: Test Yourself