Selective Prediction#
The selective prediction module enables models to abstain from predictions when uncertain, providing risk-coverage tradeoffs.
Base Class#
|
Abstract base class for selective prediction methods. |
Methods#
|
Classical confidence-thresholding à la Chow (1957). |
|
Self-Adaptive Training for better calibration and selective prediction. |
|
Add an extra abstain logit and train with the gambler's loss: |
|
Implementation of SelectiveNet (Geifman & El-Yaniv, 2019). The model outputs: * h(x): class logits * g(x): selection probability. |
|
Quick factory: make('msp', backbone) or make('selectivenet', ...). |
Metrics#
|
Proportion of accepted samples. |
|
Error rate on accepted samples (a.k.a. |
|
Area under the Risk-Coverage curve. |
|
Return (coverage, accuracy) curve for each possible threshold. |
Visualization#
|
Plot the risk-coverage curve for selective prediction. |
|
Plot the accuracy-coverage curve for selective prediction. |