EconML is a Python package for estimating heterogeneous treatment effects from observational data via machine learning.
The package addresses the problem of measuring how a causal intervention affects outcomes differently across subgroups with different characteristics. It combines machine learning techniques with econometric methods to automate causal inference on observational datasets where randomized experiments are unavailable. The toolkit estimates the causal effect of treatment variables on outcomes while controlling for confounding features, and quantifies how these effects vary across different feature values. It implements orthogonal machine learning algorithms, including double machine learning approaches, that preserve causal interpretation while using flexible modeling techniques such as random forests, boosting, lasso, and neural networks.
Adoption suits teams working on personalized decision-making problems where understanding heterogeneous treatment effects matters: pricing strategies, policy evaluation, medical interventions, and marketing optimization. The package maintains a unified API across different estimation methods and builds on standard Python packages for machine learning and data analysis. Most methods provide confidence intervals and inference results. The toolkit accommodates different causal assumptions: some methods require no unobserved confounders, while others leverage instrumental variables when available. This flexibility allows practitioners to choose methods appropriate to their data and assumptions.
Development activity shows consistent engagement with the codebase through regular updates and maintenance. The project maintains comprehensive documentation and provides multiple estimation methods reflecting recent literature at the intersection of econometrics and machine learning. Community contribution is actively encouraged through designated help-wanted issues and a structured contribution process.