Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CausalMLBookTM | Applied Causal Inference Powered by ML and AI

Free textbook | An introduction to the emerging fusion of ML and causal inference | V. Chernozhukov, C. Hansen, N. Kallus, M. Spindler, V. Syrgkanis.
CausalML Book



Applied Causal Inference Powered by ML and AI



Website arXiv Labs


Notebooks


A comprehensive, rigorous guide to modern causal inference methods powered by machine learning.

By Victor Chernozhukov 1Christian Hansen 2Nathan Kallus 3Martin Spindler 4Vasilis Syrgkanis 5

1Massachusetts Institute of Technology 2University of Chicago 3Cornell University 4Universität Hamburg 5Stanford University


About the Book

This book bridges the gap between machine learning and causal inference, providing rigorous methods for answering causal questions using modern ML tools. Topics span predictive inference, causal identification, double/debiased machine learning, heterogeneous treatment effects, instrumental variables, difference-in-differences, regression discontinuity, and more.

Read the full book and download individual chapters at CausalML-Book.org


Chapters

All chapters are available for free at causalml-book.org .

Preamble

Chapter
P Preface
0 Powering Causal Inference with ML and AI

Core Material

Chapter Topics
1 Predictive Inference with Linear Regression in Moderately High Dimensions Prediction Inference
2 Causal Inference via Randomized Experiments Causality Inference
3 Predictive Inference via Modern High-Dimensional Linear Regression Prediction
4 Statistical Inference on Predictive Effects in High-Dimensional Linear Regression Models Causality Inference
5 Causal Inference via Conditional Ignorability Causality
6 Causal Inference via Linear Structural Equations Causality
7 Causal Inference via DAGs and Nonlinear Structural Equation Models Causality
8 Predictive Inference via Modern Nonlinear Regression Prediction
9 Statistical Inference on Predictive and Causal Effects in Modern Nonlinear Regression Models Causality Inference
10 Feature Engineering for Causal and Predictive Inference Causality Inference

Advanced Topics

Chapter
11 Deeper Dive into DAGs, Good and Bad Controls
12 Unobserved Confounders, Instrumental Variables, and Proxy Controls
13 DML for IV and Proxy Controls Models and Robust DML Inference under Weak Identification
14 Statistical Inference on Heterogeneous Treatment Effects
15 Estimation and Validation of Heterogeneous Treatment Effects
16 Difference-in-Differences
17 Regression Discontinuity Designs

Interactive Labs

All labs run directly in Google Colab — no local setup required.

Browse All Labs Notebooks Repo


Python R Available in Python and R


Ch 1 — Prediction & Linear Regression
Lab Python R
OLS and Lasso for Wage Prediction Colab Colab
The Gender Wage Gap Colab Colab
Exercise on Overfitting Colab Colab
Ch 2 — Randomized Experiments
Lab Python R
Vaccination RCT (Polio 1954) Colab Colab
Covariates in RCT: Precision Adjustment Colab Colab
Reemployment Bonus RCT Colab Colab
Ch 3 — High-Dimensional Linear Regression
Lab Python R
Penalized Linear Regressions: Simulation Colab Colab
Case Study: Wage Prediction with ML Colab Colab
Ch 4 — Inference in High-Dimensional Models
Lab Python R
Simulation on Orthogonal Estimation Colab Colab
Comparing Orthogonal vs Non-Orthogonal Methods Colab Colab
Testing the Convergence Hypothesis Colab Colab
Heterogeneous Effect of Sex on Wage Colab Colab
Ch 6–7 — DAGs & Structural Equations
Lab Python R
Collider Bias (Hollywood) Colab Colab
Causal Identification in DAGs Colab Colab
DoSearch for Causal Identification Colab Colab
Ch 8 — Nonlinear Prediction
Lab Python R
ML Estimators for Wage Prediction Colab Colab
Functional Approximations by Trees and Neural Nets Colab Colab
Ch 9 — DML for Causal & Predictive Effects
Lab Python R
Effect of Gun Ownership on Homicide Colab Colab
DAG Analysis of 401(k) Impact Colab Colab
DML Inference on 401(k) Wealth Effects Colab Colab
DML for Partially Linear Model (Growth) Colab Colab
Ch 10 — Feature Engineering
Lab Python R
Variational Autoencoders and PCA Colab Colab
DoubleML Feature Engineering with BERT Colab
Ch 12–13 — IV, Proxy Controls & Weak Identification
Lab Python R
Sensitivity Analysis with Sensmakr Colab Colab
Negative (Proxy) Controls Colab Colab
DML for 401(k) with IV Colab Colab
Weak IV Experiments Colab Colab
DML for Partially Linear IV Model Colab Colab
Ch 14–16 — Heterogeneous Effects & Diff-in-Diff
Lab Python R
CATE Estimation with Causal Forests Colab
CATE Inference: Best Linear Predictors Colab
Conditional Average Treatment Effects Colab
Difference-in-Differences: Minimum Wage Colab Colab

Software Packages

Companion open-source implementations for the methods covered in the book.

DoubleML
DoubleML

Double/Debiased ML in Python & R

Docs Python R

EconML
EconML

Heterogeneous Treatment Effects

Docs GitHub

Stata ML & ddml

Regularized Regression & DML for Stata

Stata ML ddml R

PLR, IRM, PLIV, IIVM models. Builds on scikit-learn (Python) and mlr3 (R).

Double ML, Causal Forests, Meta-Learners, IV methods. Part of PyWhy.

lassopack, pdslasso, pystacked, ddml.


Citation

@article{chernozhukov2024applied,
 title = {Applied Causal Inference Powered by ML and AI},
 author = {Chernozhukov, Victor and Hansen, Christian and Kallus, Nathan
 and Spindler, Martin and Syrgkanis, Vasilis},
 journal = {arXiv preprint arXiv:2403.02467},
 year = {2024},
 doi = {10.48550/arXiv.2403.02467}
}

Popular repositories Loading

  1. MetricsMLNotebooks MetricsMLNotebooks Public

    Notebooks for Applied Causal Inference Powered by ML and AI

    Jupyter Notebook 144 68

  2. .github .github Public

Repositories

Loading
Type
Select type
Language
Select language
Sort
Select order
Showing 2 of 2 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading...

Most used topics

Loading...

AltStyle によって変換されたページ (->オリジナル) /