A deep-learning based PC algorithm for causal discovery. The conditional independence test is based on conditional mutual information which is in turn estimated by conditional copula density. The conditional copula density is measured using Normalizing Flows for both the marginal and the copula. Implementation based on Implementation of Machine Learning for Causal Discovery with Applications in Economics.
This repository is research code so use with caution :).
For installation, first create a virtual environment and install the required packages:
python3 -m venv .env
source .env/bin/activate
pip3 install -r requirements.txt
pip3 install -e .
To run the experiments on the copula flow, the marginal flow and PC algorithm with toy data, run:
bash scripts/simulation_experiments.sh
Download the eBay negotation data at a thread level from NBER and save it under datasets/ebay_data/
. Then, run:
bash scripts/application_experiments.sh
Usage of the package is allowed under the MIT license, which can be found in license.txt
.