--- id: causalml version: "0.17.0" license: unclear license_treatment: permissive maintenance: active --- # causalml — Python Package for Uplift Modeling and Causal Inference with Machine Learning Algorithms License: permissive · Maintenance: active · Downloads: 144.8K/mo ## What it is and what it does Causalml is a Python package for estimating heterogeneous treatment effects and performing causal inference using machine learning. It provides a standard interface to compute the Conditional Average Treatment Effect (CATE)—the causal impact of an intervention on an outcome for individual users—from A/B experiments or observational data, without requiring strong assumptions about model form. The package implements multiple causal inference methods based on recent research, including metalearners, doubly robust estimation, and tree-based approaches. It's designed for practical applications like campaign targeting (identifying customers most likely to respond to an ad) and personalized engagement (recommending optimal treatments for each customer). With 18 runtime dependencies spanning xgboost, lightgbm, statsmodels, and visualization libraries, it trades installation weight for a comprehensive toolkit. Use it for: - Identify which customers will respond favorably to an advertising campaign by estimating individual-level treatment effects from A/B test data. - Recommend personalized product offerings or messaging channels by estimating heterogeneous effects for each customer-treatment combination. - Analyze observational data to estimate causal impact when randomized experiments are infeasible or unethical. - Build targeting policies that maximize ROI by selecting customers with the highest predicted uplift. - Feature selection for uplift modeling to identify which customer attributes drive treatment response variation. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Causalml estimates the causal impact of treatments on outcomes at the individual level using machine learning, providing methods to compute Conditional Average Treatment Effect (CATE) from experimental or observational data. Yes, if you need to estimate causal effects or uplift at the individual level. The package is actively maintained, has no known vulnerabilities, uses a permissive license, and provides a suite of methods backed by published research. The medium install friction (18 dependencies) is justified by the breadth of algorithms and visualization tools. Not suitable if you need minimal dependencies or are restricted to Python versions below 3.11. ## Install pip install causalml uv add causalml poetry add causalml ## Installing causalml Before you install: Medium install friction due to 18 runtime dependencies including heavy ML libraries (xgboost, lightgbm, statsmodels, shap). Pre-built wheels available for Python 3.11 and 3.12 on macOS, Linux, and Windows. Project is actively maintained with recent releases. License in practice: Licensed under Apache 2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions—suitable for most production and research contexts. Quickstart: pip install causalml from causalml.inference.meta import BaseXLearner from scipy import stats learner = BaseXLearner() cate = learner.fit_predict(X, treatment, y) Requires Python 3.11 or later; graphviz system library needed for tree visualization features. Verify before relying: - Whether all 18 runtime dependencies are truly required for basic CATE estimation or if subsets work for specific use cases. - Performance characteristics and scalability limits for large observational datasets. - Stability of experimental APIs mentioned in the disclaimer and which methods are production-ready. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 144.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags uplift modeling, causal inference machine learning, heterogeneous treatment effects, conditional average treatment effect, personalized treatment effect estimation, campaign targeting optimization, observational data causal analysis, causal-inference, treatment-effect-estimation, uplift-modeling [View on SkillFed](https://skillfed.io/packages/causalml) · [View on PyPI](https://pypi.org/project/causalml/)