Skip to the workspace
Pebellslearn by building
Evaluating Models  ›  Lesson

Choosing a Threshold

Machine Learning 15 minA model's decision threshold should be set where acting on one more case stops paying, found from the costs of each kind of mistake and checked band by band on validation data.

ai data scientist / Choosing a Threshold

Explore each scene at your own pace.

01 · The rule

The rule

Choosing a Threshold

The churn model does not say "cancel" or "stay". It gives each member a score between 0 and 1, and someone has to decide where to draw the line. So far the line has been 0.5, because that is what the software did by default. But back in the expected value lesson you found that a voucher pays for itself whenever a member's chance of cancelling is above 0.4. The threshold is a business decision, and you already know how to make it.

The rule

Set the cut-off where acting stops paying, not at 0.5 by habit.

Sending a voucher to a member with cancel risk pp gains 250p250p rupees on average and costs 100 rupees, so it pays when 250p>100250p > 100, that is, when p>0.4p > 0.4. If the model's scores behave like real probabilities, the threshold is simply 0.4.

That "if" is called calibration: among members scored around 0.4, about 40% should really cancel. Check it on the validation data by grouping members into score bands and comparing each band's average score with its actual cancel rate. Many models rank members well but are over- or under-confident, and then you choose the threshold directly from value instead.

Here is the value at several thresholds on August, using ₹250 per canceller caught and ₹100 per voucher:

Threshold Flagged Cancellers caught Net value
0.6 400 320 ₹40,000
0.5 800 560 ₹60,000
0.4 1,200 740 ₹65,000
0.3 1,600 880 ₹60,000

Value peaks at 0.4, just where the break-even rule predicted, which is what well-calibrated scores should give.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.