A classifier can rank examples well while producing poor probability estimates. If predictions drive cost-sensitive decisions, triage, or risk thresholds, the difference matters. A score of 0.8 is useful as a probability only when similarly scored examples are positive about 80% of the time under the deployment distribution.
Separate discrimination from calibration
Metrics such as ROC AUC primarily measure ranking. Calibration asks whether predicted probabilities agree with observed frequencies. A model can have strong AUC and still be overconfident or underconfident.
Evaluate both when downstream code interprets scores probabilistically.
Inspect reliability by probability bins
A reliability diagram groups predictions into ranges and compares average predicted probability with observed positive frequency. It is a diagnostic, not a complete metric: results depend on binning and sample size.
Also consider proper scoring rules such as log loss or the Brier score. They reward probability quality rather than only thresholded correctness.
Fit calibration on held-out predictions
Common calibration methods include Platt-style sigmoid scaling and isotonic regression. The calibration mapping must be fitted on data not used to fit the underlying model.
A safe workflow is:
training data -> fit model
calibration data -> fit probability mapping
untouched test data -> evaluate complete pipelineCross-validation-based calibration can use data more efficiently, but the same principle applies: predictions used to learn the mapping must be out-of-sample for the base estimator.
Choose a method that matches data volume
Sigmoid calibration is constrained and often stable with modest calibration sets. Isotonic regression is more flexible but can overfit when calibration data is limited.
Do not choose the most flexible method automatically. Compare performance on untouched evaluation data and inspect behavior in probability regions that matter operationally.
Revisit thresholds after calibration
A threshold chosen on uncalibrated scores may no longer represent the same operating point after calibration. Select thresholds using explicit costs, capacity constraints, precision/recall requirements, or another domain objective.
Keep threshold selection separate from final test evaluation to avoid optimistic estimates.
Common pitfalls
Calibrating on training predictions
Models are often more confident on data they fitted. Learning a calibration map from those predictions can produce misleading results.
Expecting calibration to fix poor ranking
Calibration adjusts probability estimates; it does not create missing predictive signal. If useful cases are ranked badly, improve the model or features.
Ignoring distribution shift
A model calibrated on one prevalence or population may drift when deployment conditions change. Monitor probability distributions and outcome frequencies over time.
Reporting one aggregate score
Calibration may be acceptable overall but poor for an important subgroup or high-risk region. Slice diagnostics where decisions carry different costs, while ensuring groups have enough observations for meaningful estimates.
Treat probabilities as a product contract
If an API exposes a field named probability, downstream systems will build policies around it. Validate that contract explicitly. Good ranking tells you which examples deserve more attention; calibration tells you whether the numeric confidence is suitable for decisions.