Calibration › Calibration Plots (Reliability Diagrams)

Michael BrenndoerferFebruary 26, 20263 min read
Language AI HandbookAll chapters
Part 53 of 67Evaluation Fundamentals
Chapter 411Calibration › Calibration Plots (Reliability Diagrams)
Reading section 4 of 12 · Calibration Plots (Reliability Diagrams) · 3 minSection 4 of 12 · 3 min

Book contents

Section 4 of 12 · 3 min read

Calibration › Calibration Plots (Reliability Diagrams)One section · Sections in this chapter4 / 12 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

A calibration plot, or reliability diagram, visualizes the relationship between predicted confidence and actual accuracy. This graphical representation makes it easy to identify systematic patterns of overconfidence or underconfidence across the confidence spectrum. To construct one:

  1. Divide the confidence range [0,1][0, 1] into MM bins
  2. For each bin, plot the mean confidence on the x-axis and the empirical accuracy on the y-axis
  3. Draw a diagonal reference line representing perfect calibration

Points falling below the diagonal indicate overconfidence (the model is less accurate than its confidence suggests). Points above the diagonal indicate underconfidence. The gap between the calibration curve and the diagonal line, weighted by bin size, corresponds to the ECE.

Modern reliability diagrams often include histograms showing the distribution of predictions across confidence values, revealing whether the model tends toward extreme confidences (common in overconfident models) or expresses more moderate uncertainty. A histogram showing most mass near 1.0 suggests an overconfident model that rarely admits uncertainty, while a uniform distribution indicates the model uses the full range of confidence values.

Out[3]:
Visualization
Line plot showing perfect calibration diagonal.
Perfect calibration: accuracy equals confidence at all levels, shown by the diagonal line where predicted probabilities match empirical frequencies exactly.
Line plot showing overconfidence curve below diagonal with shaded gap.
Overconfident model: accuracy consistently falls below the confidence level (typical of neural networks), with the red shaded gap indicating the magnitude of overconfidence.
Line plot showing underconfidence curve above diagonal with shaded gap.
Underconfident model: accuracy exceeds confidence levels, showing the model is more accurate than its predicted probabilities suggest, with the green shaded gap representing underconfidence.