AI Glossary / Statistics and probability / Intermediate

Platt scaling

Definition

Platt scaling is a probability-calibration method that fits a logistic, or sigmoid, mapping from a classifier's score to an estimated class probability. It was introduced for support vector machines but is also used with other classifiers. In a common binary formulation, the calibrated probability is 1/[1 + exp(Af + B)], where f is the original score and A and B are fitted parameters. Equivalent formulations use the opposite sign convention. The method changes how scores are interpreted as probabilities; it does not retrain the original classifier's feature representation.

What it means

A classifier can rank cases usefully while assigning probabilities that are too high or too low. A score of 0.8 does not automatically mean that about 80% of comparable cases belong to the positive class. Platt scaling learns a smooth relationship between the model's scores and observed labels on calibration data. Calibration is distinct from discrimination: reliable probability levels and good ordering answer different questions. A two-parameter curve is relatively simple, but its shape can be too restrictive when the underlying miscalibration has a more complicated pattern.

How it works

Train the base classifier, then obtain scores on observations that were not used to fit that classifier. Fit the sigmoid parameters against the corresponding binary labels using the specified calibration procedure. A held-out calibration set or appropriate cross-validation can provide these out-of-sample scores. Keep an independent evaluation set for assessing the resulting probabilities. Inspect calibration plots and proper scoring rules such as log loss or the Brier score, recognizing that these scores also reflect discrimination. At deployment, apply exactly the fitted mapping to the same type of base-model score. Reassess it if the model, population or data collection process changes.

Three practical examples

  • Service triage: convert model scores into probabilities used to estimate the expected number of cases requiring review.
  • Quality inspection: calibrate a defect classifier before probability estimates enter a decision rule with unequal costs.
  • Research comparison: evaluate whether adding a sigmoid calibrator improves probability quality on independent data, rather than assuming an accuracy improvement is necessary for calibration to be useful.

Think of it this way

Think of correcting the markings on a measuring instrument. The instrument may already order objects correctly, yet its numerical readings may be misleading. A fitted conversion can make the readings more meaningful within the conditions used to establish the conversion. It does not guarantee reliability under every new operating condition.

Worked example

Suppose an artificial fitted calibrator is p(s) = 1/[1 + exp(-(1.2s - 0.4))]. A base score of 0 maps to approximately 0.4013, a score of 1 to 0.6900 and a score of 2 to 0.8808. The calibrated probability crosses 0.5 when 1.2s - 0.4 = 0, so the corresponding original-score threshold is one third. These parameters are stipulated for an original arithmetic example, not estimated from a real dataset. They show why a zero score need not map to a 50% probability after calibration. Separately, for two observed labels 1 and 0, assigning probability 0.8 to each gives a mean Brier score of [(0.8-1)^2 + (0.8-0)^2]/2 = 0.34. Assigning 0.6 to each gives 0.26. That small illustration explains a scoring calculation; two observations are nowhere near enough to validate a calibrator.

Illustrative case study

In a fictional case, Maple Support uses an existing classifier to plan staffing. Its ranking is useful, but summing the reported probabilities overstates the expected workload. Analysts fit a sigmoid calibrator using a separate period and evaluate it on a later untouched period. They compare predicted totals, probability bins and scoring rules, also checking important service categories. When an operational change alters the case mix, they review calibration again rather than assuming that the original mapping remains valid indefinitely.

Common misconceptions and mistakes

Platt scaling is not a guarantee of perfect calibration. Fitting it on the classifier's training predictions can produce optimistic results. A single global curve may conceal subgroup differences. For a positive-slope logistic mapping in the score convention used above, ranking is preserved, so ranking metrics need not improve even when probability quality improves. Threshold-based labels can nevertheless change. Calibration does not eliminate dataset shift, biased labels or weak discrimination. In multiclass extensions, separately calibrated one-versus-rest estimates may require normalization, and the resulting procedure should not be confused with fitting one binary sigmoid to all classes at once.

Business use

Businesses benefit when decisions depend on estimated probabilities rather than only a ranking. Expected costs, capacity forecasts and escalation thresholds can all be sensitive to systematic overconfidence. Document the score being calibrated, the calibration sample and the evaluation period. Use enough representative observations to assess the regions where decisions are made, especially rare high-risk cases. Compare the sigmoid approach with suitable alternatives when its shape is inadequate, while guarding against overfitting more flexible methods. The objective is dependable decision information on relevant data, not an attractive calibration chart on the fitting sample.

People also ask

Does Platt scaling require a support vector machine?

No. Although developed for that setting, it can calibrate scores from other classifiers.

Does it always improve accuracy?

No. Calibration concerns probability reliability, and accuracy also depends on the chosen decision threshold.

Is it the same as isotonic regression?

No. Platt scaling fits a sigmoid; isotonic regression fits a more flexible monotonic relationship and has different data requirements.

Check your understanding

A calibrated model has the same ranking as before but better probability estimates. Has calibration failed?

Answer: No. Ranking and calibration measure different properties, so unchanged ranking is compatible with useful probability improvements.

Related terms

  • Probability calibration
  • Logistic regression
  • Brier score
  • Log Loss
  • Isotonic regression
  • sigmoid function
  • reliability diagram

Learn next

Learn to read a reliability diagram and compute proper scoring rules, then compare held-out calibration with cross-validated calibration and examine the effects of population shift.

More in Statistics and probability

  • Pilot survey - A pilot survey is a preliminary survey conducted to test how a proposed survey works before full implementation.
  • Placebo-controlled study - A placebo-controlled study compares an intervention with a placebo: a comparison intervention designed to resemble it while omitting the specific active...
  • Plackett - Burman design - A Plackett - Burman design is a family of economical two-level experimental designs used mainly to screen many candidate factors for influential main effects.
  • Platykurtic - Platykurtic describes a distribution whose kurtosis is below the normal distribution's value of 3, or equivalently whose excess kurtosis is below zero.
  • Pocock boundary - A Pocock boundary is a group sequential testing boundary that uses a constant critical value on the standardized test-statistic scale across a planned set...
  • Point biserial correlation ( r pb ) - Point biserial correlation, commonly written r_pb, measures the association between a binary variable and a numerical variable.

Sources

Scikit-learn, Probability calibration, including sigmoid calibration based on Platt's method: https://scikit-learn.org/stable/modules/calibration.html

Previous: Plate notation Next: Platykurtic

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer