Skip to content

Code for "Finding Counterfactually Optimal Action Sequences in Continuous State Spaces", Arxiv 2023.

Notifications You must be signed in to change notification settings

MPI-SWS/counterfactual-continuous-mdp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Finding Counterfactually Optimal Action Sequences in Continuous State Spaces

This repository contains the code used in the paper "Finding Counterfactually Optimal Action Sequences in Continuous State Spaces", published at NeurIPS 2023.

Dependencies

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

Code organization

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 data
  • build_scm.sh is used to train the final SCM
  • cv_scm.sh is used to evaluate the goodness of fit of the SCM via cross-validation, under different values of the networks' Lipschitz constants
  • grande_experiment_slurm.sh is the main script used to run experiments using a slurm scheduler and this is where each experiment's configuration is set
  • single_experiment_slurm.sh is a helper script called by grande_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.

Citation

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}
}

About

Code for "Finding Counterfactually Optimal Action Sequences in Continuous State Spaces", Arxiv 2023.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 54.9%
  • Jupyter Notebook 37.9%
  • Shell 7.2%