Skip to content

order-based structure learning with normalizing flows

License

Notifications You must be signed in to change notification settings

HamidrezaKmK/oslow

Repository files navigation

Ordered Causal Discovery with Autoregressive Flows

main_fig

Python Version arXiv

InstallationExperimentsLicense

Documentation Coming Soon ...

License

This project is licensed under the MIT License - see the LICENSE file for details

Running

Setting up the Environment

conda env create -f env.yml
conda activate oslow

R Requirements

Some of the baselines, as well as calculating the SID metric, require specific R packages to be installed. After making sure that R is installed on your system, you can install the required packages by following the documentation of the cdt package here. In particular, you can run the following commands:

install.packages("BiocManager");
BiocManager::install(c("igraph", "SID", "bnlearn", "pcalg", "kpcalg", "glmnet", "mboost"));
install.packages(c("devtools"));
library(devtools); 
install_github("cran/CAM");

Causal Discovery

python train.py

Run on linear Laplace with a model that has an appropriate latent noise:

python train.py data=linear_laplace model=specified 

Run on larger covariate size (default is 3 but you can change it to 4 with the following command):

python train.py data.graph_generator.num_nodes=4

Ensemble

Run ensemble code that plots a scatterplot:

python ensemble.py

About

order-based structure learning with normalizing flows

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published