Calibration and proper scoring rules

When a model says 80%, is it right 80% of the time? Reliability diagrams and expected calibration error (and why the binning matters), the scoring rules that reward honest probabilities and the proof that they do, and three ways to fix a miscalibrated model after training — Platt scaling, isotonic regression and temperature scaling.

45 min

After this lesson you can

  • Define calibration for binary and multiclass classifiers, and explain why it is separate from accuracy and AUC
  • Read a reliability diagram and compute expected calibration error, knowing how bins and sample size distort it
  • Prove that the Brier score and log loss are proper scoring rules, and show that absolute error is not
  • Recalibrate a model with Platt scaling, isotonic regression or temperature scaling, fitted on held-out data
  • Summarise what Guo et al. (2017) found about modern networks, and what later work revised

In this lesson

  1. What calibrated means
  2. Seeing it: the reliability diagram
  3. Expected calibration error, and its caveats
  4. Scores that reward honesty
  5. Why models are miscalibrated
  6. Fixing it after training
  7. In code

This lesson is part of Descent Pro

Descent Pro unlocks every lesson on the route, from base camp to the summit. Every plan starts with a free trial.

Descent Pro

Start your free trial to keep reading

This lesson, and every other lesson on the route, is part of Descent Pro. Every plan starts with a free trial, and students with a .edu email get longer. Cancel before the trial ends and you pay nothing.