This repository contains the code for reproducing the experiments and figures presented in the paper E-Values Expand the Scope of Conformal Prediction.
The repository is structured into three main folders, each corresponding to one of the three methods presented in the paper: batch anytime-valid conformal prediction (batch-anytime-valid-cp
), fixed-size conformal sets (fixed-size-conformal-sets
), and conformal prediction under ambiguous ground truth (monte-carlo-cp
). Each folder is self-contained and independent of the others.
-
Run the
load_dataset.ipynb
notebook. This will generate afemnist.csv
file. -
Run the
split_dataset.ipynb
notebook. This will create 2 files:train.csv
(training set) andtest.csv
(test set). -
(Optional) Run the
model_train.ipynb
notebook to re-train the model f. The training weights will be saved in theweights/
folder, and the training history will be stored in theresults/
folder. -
Execute the
batch-anytime-valid-cp.ipynb
notebook to reproduce the experiments from the paper.
-
Run the
load_dataset.ipynb
notebook. This will generate afemnist.csv
file. -
Run the
split_dataset.ipynb
notebook. This will create 2 files:train.csv
(training set) andtest.csv
(test set). -
(Optional) Run the
model_train.ipynb
notebook to re-train the model f. The training weights will be saved in theweights/
folder, and the training history will be stored in theresults/
folder. -
Execute the
fixed-size-cp.ipynb
notebook to reproduce the experiments from the paper.
-
Manually download the two files
cifar10h-counts.npy
andcifar10h-probs.npy
from the CIFAR-10H dataset and place them in thedata/
folder. -
Manually download the file
cifar-10-python.tar.gz
from the CIFAR-10 dataset and add it to thedata/
folder. This step should be automatically performed when running eithermodel_train.ipynb
ormonte-carlo-cp.ipynb
. -
(Optional) Run the
model_train.ipynb
notebook to re-train the model f. The training weights will be saved in theweights/
folder, and the training history will be stored in theresults/
folder. -
Execute the
monte-carlo-cp.ipynb
notebook to reproduce the experiments from the paper. -
Visualize the results using the
plot.ipynb
notebook.