This repository contains an implementation and further details of Double Generative Adversarial Networks for Conditional Independence Testing.
Reference: Shi, C., Xu, T., Bergsma, W. and Li, L. (2021+) Double Generative Adversarial Networks for Conditional Independence Testing. Journal of Machine Learning Research, accepted.
Paper link: https://arxiv.org/pdf/2006.02615.pdf
$ git clone https://github.com/tianlinxu312/dgcit.git
$ cd dgcit/
# Create a virtual environment called 'venv'
$ virtualenv venv
$ source venv/bin/activate # Activate virtual environment
# Install all dependencies
$ python3 -m pip install -r requirements.txt
CCLE data used in the paper is downloaded from here: https://github.com/alexisbellot/GCIT/tree/master/CCLE%20Experiments
For runing experiments to compute Type I error:
# Compute Type I error for 1000 samples
$ python3 train.py \
--model="dgcit"
--test="type1error"
--n_samples=1000
For runing experiments to compute Power:
# Compute Power for 1000 samples
$ python3 train.py \
--model="dgcit"
--test="power"
--n_samples=1000
For more baseline models and parameter settings, please see train.py
file.
KCIT results were obtained using this implementation: https://github.com/ericstrobl/RCIT/blob/master/R/KCIT.R
The variable importance measures of the elastic net(EN) and random forest(RF) models, versus the p-values of the GCIT and DGCIT tests for the anti-cancer drug example.