Skip to content
This repository has been archived by the owner. It is now read-only.
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This repository contains the code for the Causal Effect Variational Autoencoder (CEVAE) model as developed at [1]. This code is provided as is and will not be updated / maintained.

Sample experiment

To perform a sample run of CEVAE on 10 replications of the Infant Health and Development Program (IHDP) dataset just type: python

Other datasets

To employ CEVAE for other datasets you can just mimic the structure of the IHDP class at Do note that you will also have to specify appropriate distributions via Edward for the covariates at x, treatments at t and outcomes at y. For example, poisson for covariates which are counts, or categorical/Bernoulli for discrete outcomes.

The definition of the distribution type for the treatment type and outcome can be easily changed by modifying lines 93, 99 for the generative model and by modifying lines 104 and 109 for the inference model at

Also note that IHDP, being a synthetic dataset, has both the treated and control conditional means (mu1 and mu0) and the factual and counterfactual outcomes (y and y_cf). These are used in to calculate various performance metrics. For a dataset without the counterfactuals you will have to avoid calling these evaluation functions and instead write your own evaluation procedure.


  • Edward 1.3.1
  • Tensorflow 1.1.0
  • Progressbar 2.3
  • Scikit-learn 0.18.1


[1] Causal Effect Inference with Deep Latent-Variable Models Christos Louizos, Uri Shalit, Joris Mooij, David Sontag, Richard Zemel, Max Welling, 2017


Causal Effect Inference with Deep Latent-Variable Models



No releases published


No packages published


You can’t perform that action at this time.