py-why /EconML
ALICE (Automated Learning and Intelligence for Causation and Economics) is a Microsoft Research project aimed at applying Artificial Intelligence concepts to economic decision making. One of its goals is to build a toolkit that combines state-of-the-art machine learning techniques with econometrics in order to bring automation to complex causal inference problems. To date, the ALICE Python SDK (econml) implements orthogonal machine learning algorithms such as the double machine learning work of Chernozhukov et al. This toolkit is designed to measure the causal effect of some treatment variable(s) t on an outcome variable y, controlling for a set of features x.
★ 4,865⑂ 839👁 86⑃ 458● 628▤ 36
+0
日增长
4,865
stars
839
forks
86
watchers
458
prs
628
issues
36
releases
README
EconML: A Python Package for ML-Based Heterogeneous Treatment Effects Estimation
EconML is a Python package for estimating heterogeneous treatment effects from observational data via machine learning. This package was designed and built as part of the ALICE project at Microsoft Research with the goal to combine state-of-the-art machine learning
techniques with econometrics to bring automation to complex causal inference problems. The promise of EconML:
Implement recent techniques in the literature at the intersection of econometrics and machine learning
Maintain flexibility in modeling the effect heterogeneity (via techniques such as random forests, boosting, lasso and neural nets), while preserving the causal interpretation of the learned model and often offering valid confidence intervals
Use a unified API
Build on standard Python packages for Machine Learning and Data Analysis
One of the biggest promises of machine learning is to automate decision making in a multitude of domains. At the core of many data-driven personalized decision scenarios is the estimation of heterogeneous treatment effects: what is the causal effect of an intervention on an outcome of interest for a sample with a particular set of features? In a nutshell, this toolkit is designed to measure the causal effect of some treatment variable(s) T on an outcome
variable Y, controlling for a set of features X, W and how does that effect vary as a function of X. The methods implemented are applicable even with observational (non-experimental or historical) datasets. For the estimation results to have a causal interpretation, some methods assume no unobserved confounders (i.e. there is no unobserved variable not included in X, W that simultaneously has an effect on both T and Y), while others assume access to an instrument Z (i.e. an observed variable Z that has an effect on the treatment T but no direct effect on the outcome Y). Most methods provide confidence intervals and inference results.
For detailed information about the package, consult the documentation at https://www.pywhy.org/EconML/.
For information on use cases and background material on causal inference and heterogeneous treatment effects see our webpage at https://www.microsoft.com/en-us/research/project/econml/
Table of Contents
- News
- Getting Started
- Installation
- Usage Examples
- Estimation Methods
- Interpretability
- Causal Model Selection and Cross-Validation
- Inference
- Policy Learning
- For Developers
- Running the tests
- Generating the documentation
- Blogs and Publications
- Citation
- Contributing and Feedback
- Community
- References
News
If you'd like to contribute to this project, see the Help Wanted section below.
November 18, 2026: Release v0.17.1, see release notes here
Previous releases
July 31, 2026: Release v0.17.0, see release notes here
July 10, 2025: Release v0.16.0, see release notes here
July 3, 2024: Release v0.15.1, see release noTop issues
#445Failing additivity check in shap_values of CausalForestDML40 comments · 2021-03-29#387Results differ between versions '0.8.1' and '0.9.0b1'26 comments · 2021-01-23#464CausalForestDML SHAP values not working properly19 comments · 2021-05-11#339How to use Bootstrap when refitting final stage?14 comments · 2020-12-11#386Conflicting packages sklearn13 comments · 2021-01-22#94Panel wrapper for DML13 comments · 2019-09-29#334Does ForestDML support multiple binary treatments?12 comments · 2020-12-07#262Co-variance matrix is undertermined11 comments · 2020-06-23
Latest release
v0.17.1 v0.17.1 2026-11-18This bugfix release improves the reliability of standard errors and confidence intervals in several estimators, and includes smaller fixes to model selection, summary output, and documentation. What's Changed More accurate inference. Correct standard errors and confidence intervals for CausalForestDML's doubly robust ATE and ATT estimates with multiple outcomes, DRLearner estimates using supplied outcome variances, DynamicDML estimates involving multiple periods, and OrthoForest marginal effects with a treatment featurizer. By @kbattocchi in 1067, 1069, and 1077. More consistent mode