This repository contains the implementation and experiments for my Bachelor's Thesis: "Bounding Causal Effects and Counterfactuals".
For a comfortable way to run the algorithms, I recommend using my Python package:
To reproduce the experiments from my thesis, follow these steps:
- Python with all required dependencies
- R programming language
- Java
-
Core Scenarios: Use the main simulation script
python run_all_simulations.py 2000 --R_path "/usr/lib/R" -
Binary Entropy Confounding: Use the specialized entropy simulation
python run_entropy_simulation.py 2000 --R_path "/usr/lib/R"
Both scripts are located in the simulation_engine folder.
Parameters:
- First argument: Number of simulations (I used 2000 for thesis results)
--R_path: Path to your R installation
To generate bound statistics tables, use:
from simulation_engine.util.plotting_util import print_bound_statistics_table
print_bound_statistics_table()- Navigate to the
classification/folder. - Run the
classification.ipynbnotebook.
simulation_engine/: Main simulation scripts and utilities- Other folders: Experimental code and result analysis tools
The simulation results and analysis tools are included in various folders throughout the repository for exploring algorithm performance and bound quality.
This repository implements algorithms from the following research works:
- Manski (1990) - Nonparametric bounds foundation
- Tian & Pearl (2000) - Probability of causation bounds
- Duarte et al. (2023) - Autobound optimization approach
- Jiang & Shpitser (2020) - Entropy-based weak confounding
- Sachs et al. (2022) - Causaloptim R library
- Zaffalon et al. (2022) - Causal expectation maximisation approach
- Zhang & Bareinboim (2021) - Continuous outcome bounding
For detailed references and citations, please consult:
- The thesis PDF document
- CausalBoundingEngine documentation