C# · ML.NET · ASP.NET

Tenure

Who is about to cancel?

A churn model for a phone and internet company, trained on 5,634 of its customers and written in C# with ML.NET. Set up a customer below and every change moves the risk. The marks show which settings pushed it.

1,409 customers the model never saw.

  • left the company (374)
  • flagged by the model
  • stayed
--of leavers caught,
F1 --
Each dot is one of the held-out test customers
one dot per test customer
Precision · flagged who really leave--
Recall · leavers who get flagged--

The model only outputs a probability. Someone still has to choose how high is high enough to call a customer. Drop the line and you catch more leavers, but you also phone more people who were staying anyway.

These figures read off the 1,409 test customers the model never saw. It ships with the line at , where F1 peaked in cross-validation, not at 50%.

Subscriber Examples

Load
Contract
Pays by

Line & services

Internet
Phone
Add-ons
Household

Churn risk This month

--
Flag
Stay
Chance of leaving on a scale of 0 to 100%, one dot per 2%, with the flag line ringed

Why the risk is there

Pushing it up

    Holding it down

      Each figure is that setting's effect on the log-odds, compared with an average customer. They add up rather than multiply. Total paid so far is taken as tenure × monthly bill.

      Test results · 1,409 held-out customers

      About 27% of these customers left. Predicting "nobody leaves" is 73% accurate and catches no one, so the score that matters is F1, which balances precision and recall on the churners.

      ModelLinePrecisionRecallF1ROC AUCAccuracy

      The line did most of the workAt a 50% line the model caught about half the leavers (F1 ). Moving it to did most of the improving. Three extra inputs helped a little.

      Trees didn't winML.NET's gradient-boosted trees with their own tuned line reached F1 , just under this model, and their reasons can't be read off a coefficient.

      Checked against ML.NETThe logistic regression here is fitted from scratch by Newton's method. ML.NET's own solver agrees on every test probability to within 0.00002.