This repository contains code for paper "Causal Discovery via Vertical Partitioning of Data Features" -- under review
Following these steps:
- Make sure you have conda ready
- Using conda, create an R-supported python environment
conda create -n rpy r-essentials r-base python=3.10
- Activate the environment, and install the following package:
pip install GPy pip install igragh pip install cdt bnlearn pip install causal-learn gcastle CausalDisco
- Pytorch is automatically installed when you install bnlearn, but it can be of the wrong cuda version if you are using a GPU engine. So, reinstall it from the Pytorch official website if needed.
- You will find in the legacy folder, the zip file prepare-r.r. You either let the content be
or (try this first and the above second if this one fails)
install.packages("BiocManager", repos="http://cran.us.r-project.org") BiocManager::install('pcalg')
And then runinstall.packages('pcalg_2.7-12.tar.gz', repos = NULL, type="source")
Make sure to comfirm that the code is successfully processed as followed in the terminal:Rscript prepare-r.r
** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (pcalg)
bash run_bash.shThe bash file is reading-friendly. Make sure the data exists in data/ and the folder res/ is created in advance.