Data science · Modelling and SQL — from a number to a decision

Calibration and thresholds — turning a score into a decision

A model outputs a number; a product needs an action. This lesson sweeps a threshold and shows that neither precision nor recall picks it — the cost of the two mistakes does, at exactly COST_FP/(COST_FP+COST_FN) — then builds a reliability table proving that a model with identical ranking can be badly miscalibrated, and that the cost rule silently breaks when it is.

27 min read Full lesson in the app Patterns: decision-threshold, expected-cost, calibration

What you'll be able to do

Before this: leakage

Log in to read the rest of this lesson

A model outputs a number; a product needs an action. This lesson sweeps a threshold and shows that neither precision nor recall picks it — the cost of the two mistakes does, at exactly COST_FP/(COST_FP+COST_FN) — then builds a reliability table proving that a model with identical ranking can be badly miscalibrated, and that the cost rule silently breaks when it is. This walkthrough runs about 27 minutes, with runnable code you can edit and re-run as you read. A new account gets 7 days of Pro free, no card required.

Log in to continue

The first module of every track is free to read on the web: see what's open in Data science.