Calibration is the process of aligning a model's predicted probability of an event, such as a click, with the true empirical frequency of that event occurring. A perfectly calibrated model ensures that among all instances receiving a predicted score of p, exactly p percent of them actually manifest the positive class, making the output a reliable statistical estimate rather than just a ranking signal.
Glossary
Calibration

What is Calibration?
Calibration is the process of aligning a model's predicted probability of an event with the true empirical frequency of that event occurring, ensuring that a predicted 5% CTR actually corresponds to a 5% observed click rate.
Miscalibration is commonly measured using Expected Calibration Error (ECE) or visualized via reliability diagrams, which bin predictions and plot predicted probability against observed frequency. Post-hoc correction techniques like Platt scaling and isotonic regression are applied to a held-out validation set to adjust raw model logits without retraining, a critical step for downstream systems that consume probabilities for bidding or risk assessment.
Key Characteristics of Calibration
Calibration ensures a model's predicted probability reflects the true likelihood of an event. A perfectly calibrated model predicting a 10% click-through rate will observe a click exactly 10% of the time.
Reliability Diagrams
Also known as calibration plots, these are the primary visual diagnostic tool. Predictions are bucketed into intervals (e.g., 0-10%, 10-20%), and the mean predicted probability is plotted against the true empirical frequency for each bucket. A perfectly calibrated model traces the diagonal y=x line. Deviations above the diagonal indicate underconfidence, while deviations below indicate overconfidence.
Expected Calibration Error (ECE)
The definitive scalar metric summarizing miscalibration. ECE computes the weighted average of the absolute difference between accuracy and confidence across all prediction bins.
- Formula: ECE = Σ (|B_m| / n) * |acc(B_m) - conf(B_m)|
- Interpretation: A lower ECE is better. An ECE of 0.05 means the model's probability estimates are off by 5% on average.
- Limitation: ECE is sensitive to binning strategy; a fixed number of bins (e.g., 10) is standard.
Platt Scaling
A post-hoc calibration method that fits a logistic regression model on the raw outputs (logits) of a classifier against the true labels. It learns scalar parameters A and B to transform logits into calibrated probabilities: P(y=1|x) = 1 / (1 + exp(A * logit + B)). Platt scaling is highly effective for binary classification and is trained on a held-out validation set to avoid overfitting the correction.
Isotonic Regression
A non-parametric calibration method that learns a piecewise constant, monotonically increasing function to map model scores to empirical probabilities. Unlike Platt scaling, it makes no assumption about the functional form of the distortion.
- Advantage: More flexible; can correct any monotonic miscalibration.
- Disadvantage: Prone to overfitting with small datasets, as it learns a step function directly from the data.
Temperature Scaling
A simple yet highly effective calibration method for multi-class neural networks. A single scalar parameter T (temperature) divides all logits before the softmax function: q_i = exp(z_i / T) / Σ exp(z_j / T). A T > 1 'softens' the probabilities, reducing overconfidence. Optimized on NLL on a validation set, it preserves accuracy while dramatically improving ECE.
Sharpness vs. Calibration
A critical distinction. Sharpness refers to the concentration of predictions near 0 or 1, reflecting decisiveness. Calibration is the statistical correctness of those probabilities. A model can be perfectly calibrated but uselessly unsharp (e.g., always predicting the base rate of 5% CTR). Conversely, a sharp but miscalibrated model is dangerously overconfident. The goal is to optimize for both.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Frequently Asked Questions
Precise answers to the most common technical questions about probability calibration in machine learning, covering reliability diagrams, Platt scaling, and isotonic regression.
Probability calibration is the process of aligning a model's predicted probability of an event with the true empirical frequency of that event occurring. A perfectly calibrated model means that among all predictions assigned a 5% click-through rate, exactly 5% of those instances actually resulted in a click. Modern deep neural networks and complex ensemble methods like gradient-boosted trees often produce overconfident or underconfident probabilities despite achieving high ranking accuracy measured by AUC. Calibration is critical in cost-sensitive decisioning systems—such as real-time bidding platforms—where the predicted probability directly determines the bid price. Without calibration, a model predicting a 10% conversion rate when the true rate is 2% leads to systematic overpayment and inefficient budget allocation.
Related Terms
Mastering calibration requires understanding its relationship with core evaluation metrics, common failure modes, and the mathematical techniques used to correct miscalibrated probabilities in production ranking systems.
Log Loss (Binary Cross-Entropy)
The canonical loss function for training calibrated probabilistic classifiers. Log loss heavily penalizes confident but incorrect predictions—a model predicting 99% click probability for a non-click incurs a far greater penalty than predicting 60%.
- Mechanism: Minimizes the negative log-likelihood of the true labels given the predicted probabilities.
- Calibration Connection: A low log loss score implicitly requires good calibration, as systematically overconfident or underconfident predictions inflate the metric.
- Formula:
- (y * log(p) + (1-y) * log(1-p))wherepis the predicted probability andyis the true binary label.
Reliability Diagram
The primary visual diagnostic tool for assessing calibration quality. It plots the observed empirical frequency against the predicted probability, bucketed into bins (e.g., 0-10%, 10-20%).
- Perfect Calibration: All points lie exactly on the
y = xdiagonal. - Overconfidence: The plotted curve lies below the diagonal—the model predicts higher probabilities than the true occurrence rate.
- Underconfidence: The curve sits above the diagonal—the model is too conservative.
- Sharpness: A separate concept from calibration; a model can be perfectly calibrated but useless if all predictions cluster around the global average (e.g., always predicting 5% CTR).
Expected Calibration Error (ECE)
A scalar summary statistic that quantifies the weighted average absolute difference between accuracy and confidence across all probability bins. ECE reduces the reliability diagram to a single, comparable number.
- Calculation: Partitions predictions into
Mequally-spaced bins. For each binm, computes|accuracy(B_m) - confidence(B_m)|, weighted by the proportion of samples in that bin. - Limitation: ECE is sensitive to binning strategy and does not distinguish between overconfidence and underconfidence within a single value.
- Target: An ECE approaching 0.0 indicates near-perfect calibration.
Platt Scaling
A post-hoc calibration technique that fits a logistic regression model on top of the raw output scores of a pre-trained classifier. It learns two scalar parameters, A and B, to map uncalibrated scores z to calibrated probabilities: p_calibrated = sigmoid(A * z + B).
- Training Data: Requires a held-out validation set distinct from the original training data to avoid overfitting.
- Best For: Correcting models where the miscalibration pattern is a smooth, sigmoidal distortion of the raw logits.
- Limitation: Assumes the miscalibration function is logistic; fails for more complex, non-monotonic distortions.
Isotonic Regression
A more flexible, non-parametric calibration method that learns a monotonically increasing step function to map raw scores to calibrated probabilities. Unlike Platt Scaling, it makes no assumption about the functional form of the miscalibration.
- Mechanism: Solves a constrained optimization problem to minimize squared error while enforcing monotonicity.
- Risk of Overfitting: The high flexibility can fit noise in small validation sets. A common mitigation is to use cross-validation to generate out-of-fold predictions for calibration training.
- Use Case: Preferred when the reliability diagram shows a jagged, non-sigmoidal deviation from the diagonal.
Temperature Scaling
A simple yet highly effective calibration method for neural networks, particularly multi-class classifiers. It divides all output logits by a single learned scalar parameter T (temperature) before applying the softmax function.
- Effect:
T > 1softens the probability distribution, correcting overconfidence.T < 1sharpens it, correcting underconfidence. - Key Advantage: Does not alter the ranking of predictions (AUC remains unchanged), only the confidence scores.
- Optimization: The optimal
Tis found by minimizing log loss on a held-out validation set.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us