Skip to main content

GANITE - Estimation of individualized treatment effects using generative adversarial nets

Tests Slack License

Code Author: Jinsung Yoon (jsyoon0823@g.ucla.edu)

Paper: Jinsung Yoon, James Jordon, Mihaela van der Schaar, "GANITE: Estimation of Individualized Treatment Effects using Generative Adversarial Nets", International Conference on Learning Representations (ICLR), 2018.

Description

Estimating individualized treatment effects (ITE) is a challenging task due to the need for an individual’s potential outcomes to be learned from biased data and without having access to the counterfactuals. We propose a novel method for inferring ITE based on the Generative Adversarial Nets (GANs) framework. Our method, termed Generative Adversarial Nets for inference of Individualized Treatment Effects (GANITE), is motivated by the possibility that we can capture the uncertainty in the counterfactual distributions by attempting to learn them using a GAN. We generate proxies of the counterfactual outcomes using a counterfactual generator, G, and then pass these proxies to an ITE generator, I, in order to train it. By modeling both of these using the GAN framework, we are able to infer based on the factual data, while still accounting for the unseen counterfactuals. We test our method on three real-world datasets (with both binary and multiple treatments) and show that GANITE outperforms state-of-the-art methods.

Installation

$ pip install ganite

Example Usage

from ganite import Ganite
from ganite.datasets import load
from ganite.utils.metrics import sqrt_PEHE_with_diff

X_train, W_train, Y_train, Y_train_full, X_test, Y_test = load("twins")

model = Ganite(X_train, W_train, Y_train, num_iterations=500)

pred = model(X_test).numpy()

pehe = sqrt_PEHE_with_diff(Y_test, pred)

print(f"PEHE score for GANITE on {dataset} = {pehe}")

Release files for ganite 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for ganite 0.1.2
File Interpreter ABI Platform
ganite-0.1.2-py3-none-macosx_10_14_x86_64.whl Python 3 none macOS 10.14+ x86-64 Details
ganite-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 27.7 kB

Release files / ganite-0.1.2-py3-none-macosx_10_14_x86_64.whl

Download URL ganite-0.1.2-py3-none-macosx_10_14_x86_64.whl
Size 13.8 kB
Tags Python 3 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
cdcb5f548ace0bf8bd5bf5b0a7917d25daca328b0c5f63c1216c0a284aa7be58
BLAKE2b-256 checksum
How to use checksums
1c9c23c483e38ad13b85c2dc7fea39980dbd4a75c3a4d229d50f31d7ef3cbbca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.6.14

Release files / ganite-0.1.2-py3-none-any.whl

Download URL ganite-0.1.2-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa5391baf3214dbe5076242f2b7ca217e703c4c98131fe2fc83cb866c1047d02
BLAKE2b-256 checksum
How to use checksums
2f730c2455a99f69a577b13eb3e7f636356eaf321f2faee3c1f5d42312d8a9ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page