Git Product home page Git Product logo

aimedlab / dsw Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 2.0 1.14 MB

Code and Datasets for the paper "Estimating Individual Treatment Effects with Time-Varying Confounders", published on ICDM 2020.

Home Page: https://arxiv.org/abs/2008.13620

License: MIT License

Python 100.00%
deep-learning causal-inference sepsis electronic-health-record time-varying-confounding individual-treatment-effects deep-sequential-weighting

dsw's Introduction

DSW

Introduction

This repository contains source code for paper "Estimating Individual Treatment Effects with Time-Varying Confounders".

In this paper, we study the problem of Estimating individual treatment effects with time-varying confounders (as illustrated by a causal graph in the figure below)

We propose Deep Sequential Weighting (DSW) for estimating ITE with time-varying confounders. DSW consists of three main components: representation learning module, balancing module and prediction module.

To demonstrate the effectiveness of our framework, we conduct comprehensive experiments on synthetic, semi-synthetic and real-world EMR datasets (MIMIC-III). DSW outperforms state-of-the-art baselines in terms of PEHE and ATE.

Requirement

Ubuntu16.04, python 3.6

Install pytorch 1.4

Data preprocessing

Synthetic dataset

Simulate the all covariates, treatments and outcomes

cd simulation
python synthetic.py

Semi-synthetic dataset

With a similar simulation process, we construct a semi-synthetic dataset based on a real-world dataset: MIMIC-III.

cd simulation
python synthetic_mimic.py

MIMIC-III dataset

Obtain the patients data of two treatment-outcome pairs: (1) vasopressor-Meanbp; (2) ventilator-SpO2.

cd simulation
python pre_mimic.py

Full list of covariates

We show the full list of static demographics and time-varying covariates of sepsis patients obtained from MIMIC-III.

Category Items Type
Demographics age Cont.
gender Binary
race (white, black, hispanic, other) Binary
metastatic cancer Binary
diabetes Binary
height Cont.
weight Cont.
bmi Cont.
Vital signs heart rate, systolic, mean and diastolic blood pressure Cont.
Respiratory rate, SpO2 Cont.
Temperatures Cont.
Lab tests sodium, chloride, magnesium Cont.
glucose, BUN, creatinine, urineoutput, GCS Cont.
white blood cells count, bands, C-Reactive protein Cont.
hemoglobin, hematocrit, aniongap Cont.
platelets count, PTT, PT, INR Cont.
bicarbonate, lactate Cont.

DSW

Running example

python train_synthetic.py --observation_window 30 --epochs 64 --batch-size 128 --lr 1e-3

Outputs

  • ITE estimation metrics: PEHE, ATE
  • Factual prediction metric: RMSE

dsw's People

Contributors

ping-zhang avatar ruoqi-liu avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

halicia luoluo-l

dsw's Issues

sample dataset

Hi, I want to try this code, but I don't find the sample datasets you mentioned in README.
please give the sample dataset or tell me the detailed structure of the input data.

Thanks.

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.