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.ipynbnotebook. This will generate afemnist.csvfile. -
Run the
split_dataset.ipynbnotebook. This will create 2 files:train.csv(training set) andtest.csv(test set). -
(Optional) Run the
model_train.ipynbnotebook 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.ipynbnotebook to reproduce the experiments from the paper.
-
Run the
load_dataset.ipynbnotebook. This will generate afemnist.csvfile. -
Run the
split_dataset.ipynbnotebook. This will create 2 files:train.csv(training set) andtest.csv(test set). -
(Optional) Run the
model_train.ipynbnotebook 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.ipynbnotebook to reproduce the experiments from the paper.
-
Manually download the two files
cifar10h-counts.npyandcifar10h-probs.npyfrom the CIFAR-10H dataset and place them in thedata/folder. -
Manually download the file
cifar-10-python.tar.gzfrom the CIFAR-10 dataset and add it to thedata/folder. This step should be automatically performed when running eithermodel_train.ipynbormonte-carlo-cp.ipynb. -
(Optional) Run the
model_train.ipynbnotebook 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.ipynbnotebook to reproduce the experiments from the paper. -
Visualize the results using the
plot.ipynbnotebook.