isotonic regression
**Isotonic Regression** is a non-parametric calibration technique that fits a monotonically non-decreasing step function to map a model's raw prediction scores to calibrated probabilities, without assuming any specific functional form for the calibration mapping. The method partitions the score range into bins where the calibrated probability within each bin equals the empirical accuracy, subject to the constraint that the mapping is monotonically increasing.
**Why Isotonic Regression Matters in AI/ML:**
Isotonic regression provides **flexible, assumption-free calibration** that can correct arbitrary distortions in a model's probability estimates—including non-linear miscalibration patterns that parametric methods like Platt scaling cannot capture.
• **Non-parametric flexibility** — Unlike Platt scaling (which assumes a sigmoid calibration curve), isotonic regression makes no assumptions about the shape of the miscalibration; it can correct S-shaped, concave, step-wise, or arbitrarily distorted probability mappings
• **Monotonicity constraint** — The only assumption is that higher model scores should correspond to higher true probabilities (monotonicity); this minimal constraint preserves the model's ranking while adjusting the probability magnitudes
• **Pool Adjacent Violators (PAV) algorithm** — Isotonic regression is solved efficiently by the PAV algorithm: scores are sorted, and whenever the monotonicity constraint is violated (a higher score has lower observed accuracy), the violating groups are merged and their probabilities averaged
• **Calibration quality** — With sufficient data, isotonic regression achieves better calibration than Platt scaling because it can model complex miscalibration patterns; however, it requires more calibration data (5,000-10,000 examples) to avoid overfitting
• **Step function output** — The calibrated mapping is a step function with as many steps as distinct score-accuracy groups; for smooth probabilities, the output can be further smoothed with interpolation
| Property | Isotonic Regression | Platt Scaling |
|----------|-------------------|---------------|
| Parametric | No (non-parametric) | Yes (2 parameters) |
| Flexibility | Arbitrary monotone mapping | Sigmoid only |
| Data Requirements | 5,000-10,000 examples | 1,000-5,000 examples |
| Overfitting Risk | Higher (with small data) | Lower (constrained) |
| Calibration Quality | Better (with enough data) | Good (if sigmoid appropriate) |
| Output Shape | Step function | Smooth sigmoid |
| Multiclass | One-vs-all | Temperature scaling |
**Isotonic regression is the most flexible post-hoc calibration technique available, providing non-parametric, assumption-free correction of arbitrary probability miscalibration patterns while preserving the model's ranking, making it the preferred calibration method when sufficient validation data is available and the miscalibration pattern is complex or unknown.**