Skip to content

This repository implements Variational Causal Inference (VCI), a variational Bayesian causal inference framework for high-dimensional treatment effect predictions and estimations.

License

Notifications You must be signed in to change notification settings

yulun-rayn/variational-causal-inference

Repository files navigation

Variational Causal Inference

This repository is the official implementation of Variational Causal Inference.

Installation

1. Create Conda Environment

conda config --append channels conda-forge
conda create -n vci-env python=3.9
conda activate vci-env
pip install -r requirements.txt

2. Install Learning Libraries

  * make sure to install the right versions for your toolkit

Data

Visit our resource site to download the datasets.

Single-cell Perturbation Dataset

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

Run

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.

License

Contributions are welcome! All content here is licensed under the MIT license.

About

This repository implements Variational Causal Inference (VCI), a variational Bayesian causal inference framework for high-dimensional treatment effect predictions and estimations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published