Understanding Calibration Curves: Why They Matter and How to Read Them

Written by Rohan Nandan on September 22, 2026 · 5 min read

Article Image

If you’ve built a classifier and only checked accuracy or AUC, you’re missing half the picture. A model can rank predictions correctly and still lie about how confident it should be. Calibration curves exist to catch exactly that.

What Is Calibration?

A model’s predicted probability should mean something. If a classifier predicts a 70% chance of rain and it is well-calibrated, then it should actually rain about 70% of the time on days it makes that prediction. That is calibration. It has nothing to do with whether the model separates positives from negatives well (that is discrimination, measured by AUC). It is about whether the number it outputs is trustworthy on its own.

This distinction trips up a lot of students. A model can have an excellent AUC — ranking positives above negatives almost perfectly — and still be badly calibrated, because the actual probability values it produces are distorted. Ranking and calibration are separate properties. You need both whenever you plan to use the probability itself: for risk scores, decision thresholds, or as input to another system.

Why Should You Care?

The practical case for checking calibration comes down to where raw probabilities get used:

How to Read a Calibration Curve

A calibration curve (also called a reliability diagram) is built in three steps:

  1. Take the predicted probabilities for the positive class from a test set.
  2. Sort and group them into bins — usually 10, fewer with limited data (0.0–0.1, 0.1–0.2, and so on).
  3. For each bin, plot the average predicted probability (x-axis) against the actual fraction of positives in that bin (y-axis).

Then compare against the diagonal line y = x, which is perfect calibration. A flawless model would put every bin’s actual positive rate exactly where its average predicted probability says, and every point would sit on that line.

In scikit-learn, those two arrays are one call:

from sklearn.calibration import calibration_curve

prob_true, prob_pred = calibration_curve(y_test, y_proba, n_bins=10)

Reading the Deviations

The shape of the deviation from the diagonal tells you how the model is wrong:

Calibration curves comparing overconfident, underconfident, and well-calibrated models against the ideal diagonal|large

A Quick Example

Suppose an SVC’s curve stays flat at 0 across predicted probabilities 0.0–0.4, jumps sharply to near 1.0, oscillates around the diagonal in the middle, then converges near the top. Reading it:

Verdict: the rankings may still be decent, but the raw probabilities should not be trusted or used directly.

What to Do If Your Model Is Miscalibrated

You don’t need to retrain from scratch. CalibratedClassifierCV wraps the existing classifier and fits a correction on held-out data:

from sklearn.calibration import CalibratedClassifierCV

calibrated_clf = CalibratedClassifierCV(base_estimator, method='sigmoid')
calibrated_clf.fit(X_train, y_train)

Two methods to choose between:

Conclusion

A calibration curve answers a question accuracy and AUC can’t: can you trust the number, not just the ranking? The habit is cheap — whenever a probability will be used as more than a ranking signal, plot the curve first. A few lines of code now beats decisions built on confident-sounding nonsense later.

Related Posts