If you are using macOS, wget
is required, which can be installed using homebrew.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install wget
Other than standard python packages (e.g., numpy, scipy, matplotlib, etc), there are dependent repositories to be installed -- pyGK
for graph kernels, pyRCDs
for the implementation of relational causal model (RCM), and SDCIT
for a suite of kernel-based (un)conditional independence tests.
Furthermore, tensorflow
and GPflow
are required.
An easy way to install them is using anaconda and a separate environment.
cd ~/anaconda/bin
./conda create --name your_env_name python=3.7 --yes
source activate your_env_name
conda install six numpy wheel scipy matplotlib pandas --yes
conda install tensorflow
cd ~/Downloads
git clone https://github.com/sanghack81/pyGK
git clone https://github.com/sanghack81/SDCIT
git clone https://github.com/sanghack81/pyRCDs
git clone https://github.com/sanghack81/KRCIT
cd SDCIT
conda install --yes --file requirements.txt
./setup.sh
python3 setup.py install
cd ../pyGK
conda install --yes --file requirements.txt
python3 setup.py install
cd ../pyRCDs
conda install --yes --file requirements.txt
python3 setup.py install
cd ..
rm -rf SDCIT pyGK pyRCDs GPflow KRCIT
Test whether all required packages are installed correctly.
import tensorflow
import gpflow
import pygk
from sdcit.sdcit import SDCIT
import pyrcds