Autumn 2025
Model calibration is all about ensuring that a model’s predicted probabilities reflect true likelihoods.
In other words, a well-calibrated model gives probabilities that match the actual outcomes.
Model calibration is all about ensuring that a model’s predicted probabilities reflect true likelihoods.
In other words, a well-calibrated model gives probabilities that match the actual outcomes.
In summary, if your model says something has a 70% chance of happening, that event should actually happen about 70% of the time over many such predictions.
We have two classifiers:
Which is better?
We have two classifiers:
Which is better?
Well, Model A is better because if a model is 90% accurate in its prediction(correctly predicting 9 out of 10 samples) then its confidence should be 90% too.
What happen with Model B?
What happen with Model B?
What happen with Model B?
On the other hand, if there was a Model C with an accuracy of 90% and 0.8 confidence in each prediction.
What happen with Model B?
On the other hand, if there was a Model C with an accuracy of 90% and 0.8 confidence in each prediction.
By definition, We say that a model is well calibrated when a prediction of a class with confidence p is correct 100p % of the time.
Otherwise, a underconfident and overconfident models are called ill-calibrated.
Below is the reliability plot (discussed further section) of an ill-calibrated and well-calibrated model:
Below is the reliability plot (discussed further section) of an ill-calibrated and well-calibrated model:
This means, a model has a lot of false negatives!!
Trustworthy predictions – especially in high-stakes areas like healthcare, legal decisions, or autonomous driving.
Better decision-making – when probabilities are used to trigger actions (like alerts or interventions).
Trustworthy predictions – especially in high-stakes areas like healthcare, legal decisions, or autonomous driving.
Better decision-making – when probabilities are used to trigger actions (like alerts or interventions).
Uncertainty estimation – useful in downstream tasks like ensembling, active learning, or Bayesian inference.
Covid detection model where if the confidence is higher than 90%, the patient is sent to the doctor.
Covid detection model where if the confidence is higher than 90%, the patient is sent to the doctor.
Covid detection model where if the confidence is higher than 90%, the patient is sent to the doctor.
Expected Calibration Error (ECE)
Maximum Calibration Error (MCE)
Reliability Diagrams – plot predicted vs actual probabilities.
ECE measures the average difference between predicted confidence and actual accuracy — across bins of predictions.
Split predictions into M bins, then for each bin B, compute accuracy and confidence: \[ECE=\sum_{i=1}^M \frac{|B_i|}{n} |acc(B_i) - conf(B_i)|\]
Where |B| means the number of samples in the bin B.
A lower ECE means better calibration.
MCE focuses on the worst-case bin — the maximum difference between confidence and accuracy across all bins. \[MCE = \max_{i=1}^{M} |acc(B_i) - conf(B_i)|\]
Highlights the largest calibration gap.
Useful when you care about any poor calibration, not just the average.