Platt scaling is a post-hoc calibration technique that learns a sigmoid function mapping a classifier's raw scores to well-calibrated probability estimates. It fits a logistic regression model on a held-out validation set, optimizing two scalar parameters to minimize the negative log-likelihood of the predicted probabilities against the true binary labels.
Glossary
Platt Scaling

What is Platt Scaling?
A parametric method for transforming classifier scores into calibrated posterior probabilities by fitting a logistic regression model to the raw outputs.
Originally developed for Support Vector Machines, which output uncalibrated distance scores, Platt scaling is now widely applied to modern neural networks. It assumes the relationship between raw scores and empirical probabilities follows a logistic curve, making it a parametric alternative to non-parametric methods like isotonic regression, and is particularly effective when calibration errors are symmetric.
Key Characteristics of Platt Scaling
Platt Scaling is a post-hoc calibration method that fits a logistic regression model to the raw outputs of a classifier to produce well-calibrated posterior probabilities. It is particularly effective for models with sigmoidal-shaped distortion in their reliability diagrams.
Logistic Sigmoid Transformation
Platt Scaling learns a scalar A and B parameter to transform raw classifier scores f(x) into calibrated probabilities: P(y=1 | f) = 1 / (1 + exp(A * f + B)). The parameter A controls the slope of the sigmoid, sharpening or softening probabilities, while B shifts the decision threshold. This parametric form assumes the relationship between raw scores and empirical frequencies follows a logistic curve, making it ideal for Support Vector Machines and other maximum-margin classifiers that exhibit sigmoidal distortion.
Training on a Held-Out Calibration Set
The parameters A and B are optimized using maximum likelihood estimation on a dedicated calibration dataset, distinct from both training and test sets. Using the same data for training and calibration introduces severe overfitting bias, producing unrealistically low calibration errors. The logistic regression model is trained with the raw classifier scores as the single input feature and the binary ground-truth labels as targets. Cross-validation on the training set can generate out-of-fold predictions for calibration when data is scarce.
Avoiding Overfitting with Out-of-Sample Strategy
A critical implementation detail is ensuring the calibration set is strictly independent of the data used to train the base classifier. The standard protocol involves a three-way split:
- Training set: Fits the base classifier parameters
- Calibration set: Fits the Platt Scaling parameters A and B
- Test set: Evaluates the final Expected Calibration Error (ECE) Failing to maintain this separation leads to optimistic calibration estimates that do not generalize to production data.
Comparison to Temperature Scaling
Platt Scaling is a two-parameter generalization of Temperature Scaling. Temperature Scaling divides all logits by a single scalar T, which is equivalent to Platt Scaling with B fixed at 0. The additional bias term B in Platt Scaling allows it to correct systematic overconfidence or underconfidence that is not centered around zero. For modern neural networks, Temperature Scaling often matches Platt Scaling's performance while being simpler, but Platt Scaling remains superior when the base classifier exhibits asymmetric confidence distortion.
Assumptions and Failure Modes
Platt Scaling assumes the raw classifier scores are monotonically related to the true posterior probabilities. It fails when:
- The score distribution is non-monotonic, where higher scores do not consistently indicate higher empirical accuracy
- The base model produces pathological score distributions with heavy tails or multi-modal behavior
- The calibration dataset is too small, causing high-variance estimates of A and B In these cases, non-parametric methods like Isotonic Regression may be more appropriate despite their higher data requirements.
Historical Origin and SVM Context
John Platt introduced this method in 1999 specifically to extract calibrated probabilities from Support Vector Machines, which natively output an uncalibrated signed distance from the decision boundary. The technique transformed SVMs from pure discriminative classifiers into probabilistic models suitable for decision-theoretic applications like cost-sensitive classification and reject-option scenarios. The original paper demonstrated that the sigmoid mapping consistently improved probability estimates over naive normalization of SVM outputs.
Platt Scaling vs. Other Calibration Methods
A feature-level comparison of Platt Scaling against Temperature Scaling and Isotonic Regression for post-hoc probability calibration.
| Feature | Platt Scaling | Temperature Scaling | Isotonic Regression |
|---|---|---|---|
Model Type | Parametric | Parametric | Non-Parametric |
Functional Form | Logistic sigmoid | Scalar logit divisor | Piecewise constant monotonic |
Parameters Learned | 2 (A, B) | 1 (T) | Variable (bin thresholds) |
Preserves Rank Order | |||
Multiclass Extension | One-vs-rest or matrix | Single scalar per model | One-vs-rest per class |
Risk of Overfitting | Low (2 params) | Very low (1 param) | High on small datasets |
Validation Set Size Needed | Moderate | Small | Large |
Assumes Sigmoid Shape |
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
Clear, technical answers to the most common questions about Platt scaling, its implementation, and its role in confidence calibration.
Platt scaling is a parametric calibration method that transforms the raw, uncalibrated output scores of a binary classifier into well-calibrated posterior probabilities. It works by fitting a logistic regression model on top of the classifier's raw scores (logits or SVM margins) using a held-out validation set. The transformation learns two scalar parameters, A and B, such that the calibrated probability P(y=1|x) equals 1 / (1 + exp(A * f(x) + B)), where f(x) is the raw classifier output. The parameters are optimized by minimizing the negative log-likelihood on the calibration set, effectively finding the sigmoid function that best maps scores to empirical class frequencies. Unlike histogram binning, Platt scaling assumes a smooth, monotonic relationship between scores and probabilities, making it particularly effective when the raw scores are roughly normally distributed per class. It was originally introduced by John Platt in 1999 to convert Support Vector Machine (SVM) decision values into probabilistic outputs but is now widely applied to neural network logits as a lightweight post-hoc calibrator.
Related Terms
Explore the core concepts that complement Platt Scaling in the calibration ecosystem, from evaluation metrics to alternative parametric and non-parametric methods.
Expected Calibration Error (ECE)
The primary empirical metric for diagnosing miscalibration. ECE partitions predictions into M equal-width bins and computes the weighted average of the absolute difference between accuracy and confidence within each bin.
- Formula: ECE = Σ (|B_m|/n) * |acc(B_m) - conf(B_m)|
- A lower ECE indicates better calibration.
- Limitation: Sensitive to binning strategy; does not distinguish overconfidence from underconfidence.
Isotonic Regression
A powerful non-parametric alternative to Platt Scaling that learns a piecewise constant, monotonically increasing function to map raw scores to calibrated probabilities.
- Advantage: Makes no assumption about the functional form of the miscalibration; can fit any monotonic distortion.
- Disadvantage: Prone to overfitting on small validation sets due to its high flexibility.
- Often implemented via the Pair-Adjacent Violators (PAV) algorithm.
- Best suited when the relationship between scores and empirical frequency is complex and non-sigmoidal.
Brier Score
A strictly proper scoring rule that measures the mean squared error between the predicted probability vector and the one-hot encoded true outcome.
- Formula: BS = (1/N) Σ ||p_i - y_i||²
- Decomposes into refinement (sharpness) and calibration components.
- A lower Brier Score indicates better overall probabilistic performance.
- Unlike ECE, it jointly penalizes poor calibration and poor discrimination, making it a holistic metric.
Negative Log-Likelihood (NLL)
Also known as cross-entropy loss, NLL is a proper scoring rule that heavily penalizes confident misclassifications. It is the objective function minimized by Platt Scaling's logistic regression fit.
- NLL = -log(p_y), where p_y is the predicted probability of the true class.
- A perfectly calibrated model with high confidence in correct predictions achieves low NLL.
- Sensitivity: Approaches infinity as the probability of the correct class approaches zero, making it a strict measure of calibration quality.
Reliability Diagram
The standard visual diagnostic for calibration. It plots predicted probability on the x-axis against observed empirical frequency on the y-axis.
- A perfectly calibrated model follows the identity diagonal (y = x).
- Below diagonal: Overconfidence (predicted probability > observed frequency).
- Above diagonal: Underconfidence.
- Often displayed alongside a histogram of prediction counts per bin to indicate where most samples lie.
- Platt Scaling's sigmoid mapping can be overlaid to visualize the correction applied.

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