--- id: econml version: "0.17.0" license: MIT license_treatment: permissive maintenance: active --- # econml — This package contains several methods for calculating Conditional Average Treatment Effects License: permissive · Maintenance: active · Downloads: 563.1K/mo ## What it is and what it does EconML is a machine learning toolkit for causal inference that estimates heterogeneous treatment effects—how the causal impact of an intervention on an outcome varies across different groups or feature values. It combines econometric methods with modern ML techniques to work with observational (non-experimental) data, where you measure treatment T's effect on outcome Y while controlling for confounders X and W. The package provides a unified API across multiple estimation strategies, many of which return confidence intervals and statistical inference results. The core use case is personalized decision-making: given a sample with particular features, what is the expected causal effect of applying a treatment to that sample? This is useful in policy learning, A/B testing analysis, and any domain where you need to understand not just average effects but how effects differ across populations. The package assumes either no unobserved confounders or access to instrumental variables, depending on the method chosen. Use it for: - Estimate how a marketing intervention's effect on customer spending varies by customer demographics or purchase history. - Analyze clinical trial or observational medical data to determine which patient subgroups benefit most from a treatment. - Evaluate policy interventions to identify which populations see the largest causal effects. - Learn optimal treatment assignment policies by combining effect estimation with policy learning methods. - Conduct causal model selection and cross-validation to choose among competing heterogeneous effect estimators. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. EconML estimates heterogeneous treatment effects from observational data using machine learning, measuring how causal effects of interventions vary across different sample characteristics. Yes, if you need to estimate causal treatment effects from observational data and want flexibility in modeling effect heterogeneity. The package is actively maintained, well-documented, MIT-licensed, and has no known vulnerabilities. Install friction is moderate due to dependencies; ensure your environment can build numba and scipy. Not suitable if you only need average treatment effects or lack domain knowledge of causal assumptions. ## Install pip install econml uv add econml poetry add econml ## Installing econml Before you install: Medium install friction due to 11 runtime dependencies including numpy, scipy, numba, and lightgbm. Active maintenance with recent release (14 days old) and strong repository signals (4753 stars, last commit 2026-08-11). Prebuilt wheels available for Python 3.9–3.14 across macOS, Linux, and Windows. License in practice: MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include the license notice. Quickstart: pip install econml from econml.dml import LinearDML from econml.inference import BootstrapInference est = LinearDML(model_y=LassoCV(), model_t=LassoCV()) est.fit(Y, T, X=X, W=W) Requires Python ≥3.9; medium install friction due to compiled dependencies (numba, scipy, lightgbm) that may require build tools on some systems. Verify before relying: - Whether the package supports GPU acceleration or distributed computation for large datasets. - Performance characteristics and scalability limits for high-dimensional feature spaces. - Specific causal assumptions required by each estimation method and how to validate them. - Whether LassoCV is available as a built-in or requires external installation. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 563.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags heterogeneous treatment effects, causal inference machine learning, treatment effect estimation, conditional average treatment effects, observational causal analysis, econometrics machine learning, personalized treatment effects, causal-inference, econometrics, observational-data [View on SkillFed](https://skillfed.io/packages/econml) · [View on PyPI](https://pypi.org/project/econml/)