$ cd ../
Conformal Prediction -- coverage with guarantees — bash

user@devops:~$ cat README.md

Conformal Prediction -- coverage with guarantees

# Description

Conformal Prediction (Vovk / Romano / Candes) implemented from scratch in Python + scikit-learn (no MAPIE). Part 1: Split Conformal Regression on California Housing (train 10,836 / cal 4,644 / test 5,160) with GradientBoosting and absolute-residual scores -- qhat(alpha=0.10)=0.790, empirical coverage 88.68% (target 90%), constant width 1.58. Part 2: multi-alpha calibration curve (0.50 to 0.02) with mean |cov-target| error of only 0.79 pp -- Vovk's +1 correction sustains the finite-sample guarantee. Part 3: Conformalized Quantile Regression (CQR) with GBR quantiles alpha/2 and 1-alpha/2; adaptive widths (mean 1.86) that level conditional coverage across yhat quintiles (~89-91% everywhere) versus Split's conditional failure (Q5 only 73.8%). Part 4: conformal classification on Wine -- LAC (1-p_y) and APS (cumulative mass) at 100% coverage with mean set size 1.13 (93% singletons). Part 5: 10-fold CV+/Jackknife+ vs Split on n=400 subsample -- 92.3% coverage without a calibration hold-out. Part 6: conditional-coverage dashboard and 5-method summary. 6 visualizations.

# Key features

$ Split Conformal Regression with +1 correction (Vovk): finite-sample qhat and marginal coverage ~1-alpha

$ Multi-alpha calibration curve: mean |cov-target| error = 0.79 pp on California Housing

$ CQR (Romano et al.): adaptive-width intervals that fix conditional coverage

$ Finding: Split CP Q1=97% vs Q5=74% conditional; CQR levels to ~89-91% across quintiles

$ Conformal classification LAC + APS on Wine: 100% coverage, mean size 1.13 (93% singletons)

$ CV+/Jackknife+ (Barber et al.): 92.3% coverage without wasting a calibration split

$ 6 visualizations: intervals, calibration, adaptive CQR, LAC/APS sets, CV+ vs Split, dashboard

# Gallery

Project terminal
Conformal Prediction -- coverage with guarantees - Project terminal
Split CP 90% intervals
Conformal Prediction -- coverage with guarantees - Split CP 90% intervals
Coverage vs alpha calibration
Conformal Prediction -- coverage with guarantees - Coverage vs alpha calibration
CQR adaptive widths
Conformal Prediction -- coverage with guarantees - CQR adaptive widths
LAC/APS classification
Conformal Prediction -- coverage with guarantees - LAC/APS classification
CV+ vs Split CP
Conformal Prediction -- coverage with guarantees - CV+ vs Split CP
Summary dashboard
Conformal Prediction -- coverage with guarantees - Summary dashboard

# Technologies used

Python scikit-learn NumPy Matplotlib SciPy