Conformal Prediction for Hierarchical Data

May 12, 2026 · View on GitHub

This repository is the official implementation of Conformal Prediction for Hierarchical Data.

Requirements

To install the packages:

Rscript install_packages.R

📋 The experiments are run under R version 3.6.1.

Running Experiments

For the sake of clarity, we distinguish the code that runs a single instance (or job) from the one which runs the entire experiment presented in the article.

Single run

To perform one instance of the experiment, run this command:

Rscript R/study.R --simulation_index 0 --config "3 12 1000000 1000 1" 

📋 This code can be run on a personal computer. The "config" parameter can be adapted to correspond to one of the six configurations considered in the article. The arguments of the "config" parameter in the above example are depth = 3, n = 12, T = $10^{6}$$, N= \1$0^{3}$$ (not used here) and 1, the configuration index. The complete experiment can be run using a "for loop" on the simulation indices in ./R/study.R (but we prefer the parallelized setup described in the following section).

Complete Experiment

To perform the complete experiment, run this command:

sbatch launcher.sh

📋 This code is based on SLURM, thus it requires adequate computational ressources (typically a Linux high performance computing environment). The files launcher.sh and run.sh shall be modified to corresponds to your own computational ressources.

Evaluation

To evaluate the performances of the complete experiment for the different approaches, run this command:

sbatch eval.sh

📋 The outputs are, among other things, the figures and two .txt files containing the LaTeX code used to reconstruct the tables.

Results

We copy here the main experimental results from the article:

SCP for joint coverage based on ellipsoidal sets

Matrix AConfig.Alg. (1)Alg. (2)
Σ^1\widehat{\Sigma}^{-1}117.4 ± 0.616.5 ± 0.55
Σ^1\widehat{\Sigma}^{-1}23.36 ± 0.123.19 ± 0.11

Component-wise SCP

Config.DirectOLSWLSCombiMinT
1876 ± 254787 ± 226322 ± 131364 ± 101216 ± 47
2871 ± 253753 ± 216308 ± 116361 ± 92246 ± 51
33032 ± 4672954 ± 4551869 ± 3771758 ± 3951502 ± 578
43036 ± 4792901 ± 4581581 ± 3401604 ± 3491404 ± 571
510424 ± 88510358 ± 8808861 ± 8539664 ± 85010613 ± 918
610621 ± 88910460 ± 8757673 ± 7859068 ± 80610503 ± 905