Conformal Prediction#
The conformal prediction module provides distribution-free uncertainty quantification with finite-sample coverage guarantees.
Core Predictor#
|
Thin wrapper around a calibrated conformal predictor. |
Classification Methods#
|
Classical Inductive Conformal Prediction (ICP) — Vovk, Gammerman, and Shafer, Algorithmic Learning in a Random World (2005). |
|
Mondrian Conformal Prediction — Papadopoulos, Reliable Classification with Conformal Predictors (2008). |
|
Adaptive Prediction Sets (APS) — Romano, Patterson, and Candes, NeurIPS 2020. |
|
Regularized APS (RAPS), Angelopoulos, Bates, Malik, and Jordan (ICLR 2021). |
Regression Methods#
|
Jackknife+ Intervals Barber, Candès, and Ramdas (Ann. |
|
Cross-Validation+ Intervals (CV+) Barber et al. (Ann. |
Conformalized Quantile Regression (CQR) Romano, Patterson, and Candes (NeurIPS 2019). |
Metrics#
|
Fraction of test examples where y_i ∈ Ŝ_i. |
|
|
|
Coverage conditioned on groups (e.g., class labels). |
Visualization#
|
Plot empirical coverage versus the desired miscoverage rate |
|
Plot a histogram of prediction-set sizes. |
Utilities#
|
Compute the conformal quantile at level (1 - alpha). |
|
Convert conformity scores to prediction sets. |
|
Split dataset into calibration and test sets. |