Skip to main content

Bayesian Inference of Individualized Treatment Effects using Multi-task Gaussian Processes

Tests Slack License

Code Author: Ahmed M. Alaa

Paper: Ahmed M. Alaa, Mihaela van der Schaar, "Bayesian Inference of Individualized Treatment Effects using Multi-task Gaussian Processes", NIPS 2017.

Description

Predicated on the increasing abundance of electronic health records, we investigate the problem of inferring individualized treatment effects using observational data. Stemming from the potential outcomes model, we propose a novel multitask learning framework in which factual and counterfactual outcomes are modeled as the outputs of a function in a vector-valued reproducing kernel Hilbert space (vvRKHS). We develop a nonparametric Bayesian method for learning the treatment effects using a multi-task Gaussian process (GP) with a linear coregionalization kernel as a prior over the vvRKHS. The Bayesian approach allows us to compute individualized measures of confidence in our estimates via pointwise credible intervals, which are crucial for realizing the full potential of precision medicine. The impact of selection bias is alleviated via a risk-based empirical Bayes method for adapting the multi-task GP prior, which jointly minimizes the empirical error in factual outcomes and the uncertainty in (unobserved) counterfactual outcomes. We conduct experiments on observational datasets for an interventional social program applied to premature infants, and a left ventricular assist device applied to cardiac patients wait-listed for a heart transplant. In both experiments, we show that our method significantly outperforms the state-of-the-art.

Installation

$ pip install cmgp

Example Usage

from cmgp import CMGP
from cmgp.datasets import load
from cmgp.utils.metrics import sqrt_PEHE_with_diff

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

model = CMGP(X_train, W_train, Y_train, max_gp_iterations=100)

pred = model.predict(X_test)

pehe = sqrt_PEHE_with_diff(Y_test, pred)

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

References

  1. Bayesian Inference of Individualized Treatment Effects using Multi-task Gaussian Processes
  2. Limits of Estimating Heterogeneous Treatment Effects:Guidelines for Practical Algorithm Design
  3. J. L. Hill. Bayesian Nonparametric Modeling for Causal Inference. Journal of Computational and Graphical Statistics, 2012.

Release files for cmgp 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 cmgp 0.1.2
File Interpreter ABI Platform
cmgp-0.1.2-py3-none-macosx_10_14_x86_64.whl Python 3 none macOS 10.14+ x86-64 Details
cmgp-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 27.8 kB

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

Download URL cmgp-0.1.2-py3-none-macosx_10_14_x86_64.whl
Size 13.9 kB
Tags Python 3 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
7ab50d683ac731cfefed74107f7cc3cf31572eb5c5eadb6633d2959023bf4580
BLAKE2b-256 checksum
How to use checksums
ba9842ce204cf8038e200a7f0469296e3854e625c5237f0c0637bbbd2399a7ec
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.7.11

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

Download URL cmgp-0.1.2-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa663dfa2c15514371edfff644d0a2c9e1770c1b154c02fd3c33c249e5f804e8
BLAKE2b-256 checksum
How to use checksums
2fbd8b17181e63ae522f65803d6d0816491bcff360aab0b3f938ae27e995e5f7
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.8.11

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