Coder Social home page Coder Social logo

cevae's Introduction

CEVAE

This repository contains the code for the Causal Effect Variational Autoencoder (CEVAE) model as developed at [1].

Sample experiment

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

Other datasets

To employ CEVAE for other datasets you can just mimic the structure of the IHDP class at datasets.py. 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 cevae_ihdp.py.

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 evalution.py 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.

Requirements

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

References

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

cevae's People

Contributors

clouizos avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.