Source
Calibration: improving our model such that predicted probability distribution is similar to the probability observed in training data.
Calibration plot (=q-q plot)
- 2 classes {−1,1}
- sort by predicted probability p^i=P^(y=1∣Xi)
- Define bins Bi between 0 and 1 and compute pi=∣Bi∣∑k,p^k∈BiIyk=1
- plot p^i against p^i.
Perfect calibration plot should be identity:
Sigmoid / Platt calibration
Logistic regression on our model output:
P^new(y∣X)=1+exp−[αP^(y∣X)+β]1
Optimized over α and β.
Isotonic regression
Let (p^1,p1),…,(p^n,pn). Isotonic regressions seeks weighted least-squares fit pi^new≈pi s.t. pi^new≤pj^new whenever pi^≤p^j.
Objective is: min∑i=1nwi(p^inew−pi)2 s.t. p^1new≤⋯≤p^jnew assuming the pi's are ordered.
This yields a piecewise constant non-decreasing function. To solve this we use the pool adjacent violators algorithm. See these notes.