This repository contains the code used in the paper "Finding Counterfactually Optimal Action Sequences in Continuous State Spaces", published at NeurIPS 2023.
All the experiments were performed using Python 3.9. In order to create a virtual environment and install the project dependencies you can run the following commands:
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
The directory src contains the source code for the experiments.
The directory scripts contains bash scripts that use the aforementioned code and pass parameter values required for the various experiments.
build_datasets.sh
is preprocessing the sepsis management databuild_scm.sh
is used to train the final SCMcv_scm.sh
is used to evaluate the goodness of fit of the SCM via cross-validation, under different values of the networks' Lipschitz constantsgrande_experiment_slurm.sh
is the main script used to run experiments using a slurm scheduler and this is where each experiment's configuration is setsingle_experiment_slurm.sh
is a helper script called bygrande_experiment_slurm.sh
solve_facility_location.sh
is used to precompute anchor sets using the Facility-Location method
The directory notebooks contains jupyter notebooks producing the figures appearing in the paper. Each notebook reads output files generated by scripts. For details, see grande_experiment_slurm.sh
and the description within each notebook.
The directory figures is used for saving the figures produced by the notebooks.
The directory outputs and its sub-directories are used for saving the outputs generated by the scripts.
If you use parts of the code in this repository for your own research, please consider citing:
@inproceedings{tsirtsis2023finding,
title={Finding Counterfactually Optimal Action Sequences in Continuous State Spaces},
author={Tsirtsis, Stratis and Gomez-Rodriguez, Manuel},
booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
year={2023}
}