GithubHelp home page GithubHelp logo

dragonnet's Introduction

Introduction

This repository contains software and data for "Adapting Neural Networks for the Estimation of Treatment Effects".

The paper describes approaches to estimating causal effects from observational data using neural networks. The high-level idea is to modify standard neural net design and training in order to induce a bias towards accurate estimates.

Requirements and setup

You will need to install tensorflow 1.13, sklearn, numpy 1.15, keras 2.2.4 and, pandas 0.24.1

Data

  1. IHDP This dataset is based on a randomized experiment investigating the effect of home visits by specialists on future cognitive scores. It is generated via the npci package https://github.com/vdorie/npci (setting A) For convenience, we have also uploaded a portion of the simulated data in the dat folder. This can be used for testing the code.

  2. ACIC ACIC is a collection of semi-synthetic datasets derived from the linked birth and infant death data (LBIDD)

Reproducing neural net training for IHDP experiments

The default setting would let you run Dragonnet, TARNET, and NEDnet under targeted regularization and default mode

You'll run the from src code as ./experiment/run_ihdp.sh Before doing this, you'll need to edit run_ihdp.sh and change the following: data_base_dir= where you stored the data output_base_dir=wherer you want the result to be

If you only want to run one of the frameworks, delete the rest of the options in run_ihdp.sh

Reproducing neural net training for the ACIC experiment

Same as above except you run the from src code as ./experiment/run_acic.sh

Computing the ATE

All of the estimators functions are in semi_parametric_estimation.ate

To reproduce the table in the paper: i) get the neural net predictions; ii) update the output file location in ihdp_ate.py iii) run ihdp_ate.py. The make_table function should generate the mean absolute error for each framework.

Note: the default code use all the data for prediction and estimation. If you want to get the in-sample or out-sample error: i) change the train_test_split criteria in ihdp_main.py; ii) rerun the neural net training; iii) run ihdp_ate.py with apporiate in-sample data and out-sample data.

dragonnet's People

Contributors

claudiashi57 avatar vveitch avatar arose13 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.