Platt Scaling is a post-hoc calibration technique that transforms the raw output scores (logits) of a trained classifier into well-calibrated probabilities by fitting a logistic regression model on a held-out validation set. The method learns two parameters (slope A and intercept $B$) that map the original logit $z$ to a calibrated probability $p =$ 1/(1 $+ \exp(Az + B)$), effectively adjusting the model's confidence to match observed accuracy frequencies.
Why Platt Scaling Matters in AI/ML:
Platt scaling provides a simple, effective method to convert overconfident or miscalibrated model outputs into reliable probability estimates without retraining the original model, essential for decision-making systems that depend on accurate confidence scores.
• Logistic transformation — Platt scaling fits $p(y=1|z) = \sigma (Az + B)$ where $z$ is the model's raw score, A and $B$ are learned on validation data to minimize negative log-likelihood; this two-parameter model corrects both scale $(A)$ and bias $(B)$ of the original scores
• Post-hoc application — The technique is applied after model training using a held-out calibration set, requiring no changes to model architecture, training procedure, or inference pipeline—just a thin calibration layer on top of existing outputs
• Overconfidence correction — Modern deep neural networks are systematically overconfident (predicted probability of 0.95 may have only 0.80 actual accuracy); Platt scaling compresses the probability range to match empirical accuracy, improving reliability
• Binary to multiclass extension — For multiclass classification, Platt scaling extends to temperature scaling (a single-parameter variant) or per-class Platt scaling; temperature scaling divides all logits by a learned temperature $T$ before softmax
• Validation set requirements — Platt scaling requires a held-out calibration set (typically 1000-5000 examples) separate from both training and test sets; the calibration parameters are fit on this set using maximum likelihood
| Component | Specification | Notes |
|---|---|---|
| Input | Raw logit or decision score $z$ | From any trained classifier |
| Parameters | A (slope), $B$ (intercept) | Learned on calibration set |
| Output | $\sigma (Az + B)$ | Calibrated probability |
| Fitting | Max likelihood (NLL loss) | On held-out calibration data |
| Calibration Set Size | 1000-5000 examples | Separate from train and test |
| Multiclass Extension | Temperature scaling $(T)$ | $z_i/T$ before softmax |
| Computational Cost | Negligible | Two-parameter optimization |
Platt scaling is the most widely used post-hoc calibration technique in machine learning, providing a simple two-parameter logistic transformation that converts miscalibrated model scores into reliable probability estimates, enabling trustworthy confidence-based decision making without any modification to the underlying model.