This repository is the official implementation of Variational Causal Inference.
conda config --append channels conda-forge
conda create -n vci-env python=3.9
conda activate vci-env
pip install -r requirements.txt
* make sure to install the right versions for your toolkit
Visit our resource site to download the datasets.
Download the contents of cell/
into datasets. To see how to process your own dataset, download the contents of raw/
into datasets and follow the examples. A clean example of data preparation can be found in SciplexPrep.ipynb. For an example of data preparation on a messier dataset with thorough analysis and visualizations, see MarsonPrep.ipynb.
In summary, the preparation procedure includes:
-
Quality Control
-
Normalization
-
Gene Selection
-
Field Specification
-
(Optional) Dataset Split
-
(Optional) Out-of-distribution Selection
-
(Optional) Differentially-expressed Gene Ranking
Once the environment is set up and the data are prepared, the function call to train the model is:
./run-gene.sh &
./run-celebA.sh &
./run-morphoMNIST.sh &
A list of flags may be found in these run files and main.py
for experimentation with different network parameters. The run log and models are saved under *artifact_path*/saves
, and the tensorboard log is saved under *artifact_path*/runs
.
Contributions are welcome! All content here is licensed under the MIT license.