This repository contains the code to reproduce the numerical results in Not all distributional shifts are equal: Fine-grained robust conformal inference.
datasets/: includes all the datasets for real data analysis.nslm_semi_synthetic.csvis the semi-synthetic data generated based on the NSLM dataset of Carvalho et al.covid_original.csvandcovid_replication.csvcorrespond to the results from the original and replication study on the sharing COVID-related information.
scripts/: contains the python code for reproducing the simulation and real application results of the paper.simulation.pyreproduces the simulation results in Section 5.nslm.pyreproduces the results in Section 6.1.acs_income.pyreproduces the results in Sectin 6.2.covid.pyreproduces the results in Section 6.3.
results/: stores all the output files.
To set up the virtual environment, run the following command in terminal:
source ./scripts/venv3115/bin/activate
To reproduce one run of the simulation, execute the following command in terminal:
cd scripts
python3 simulation.py 1
To reproduce one run of the experiment on the NSLM dataset, execute the following command in terminal:
python3 nslm.py 1
To reproduce one run of the experiment on the ACS income dataset, execute the following command in terminal:
python3 acs_income.py 1
To reproduce one run of the experiment on the COVID dataset, execute the following command in terminal:
python3 covid.py 1
- The code for estimating the conditional cumulative distribution function is from the qosa-index package.
- The ACS income dataset and corresponding models are obtained from WhyShift.
- The COVID information datasets are from awesome-replicability-data.