causalml
Python Package for Uplift Modeling and Causal Inference with Machine Learning Algorithms
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later; graphviz system library needed for tree visualization features.
- 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.
License · maintenance · safety
permissive license (permissive) — Licensed under Apache 2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions—suitable for most production and research contexts.
last release 2026-07-04 (41 days) · last repo commit 2026-08-14 · 5,953 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 144,829 downloads/mo, #11,141 on PyPI
Alternatives
Verify before relying
pip install causalml
from causalml.inference.meta import BaseXLearner
from scipy import stats
learner = BaseXLearner()
cate = learner.fit_predict(X, treatment, y)- 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.
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 on this page. Verify before relying on it.
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
causalml on PyPI
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.
Requires Python 3.11 or later; graphviz system library needed for tree visualization features.
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)
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 | permissive license permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 18 packagesforestcipathosnumpyscipymatplotlibpandasscikit-learnstatsmodelsseabornxgboostpydotplustqdmshapdilllightgbmpackaginggraphvizblack |
| Maintenance | Actively maintained 41 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 144,829 / month, #11,141 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python |
Evidence: causalml-0.17.0-cp311-cp311-macosx_11_0_arm64.whl; causalml-0.17.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; causalml-0.17.0-cp311-cp311-win_amd64.whl; causalml-0.17.0-cp312-cp312-macosx_11_0_arm64.whl; causalml-0.17.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; causalml-0.17.0-cp312-cp312-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “uplift modeling”
- causalmlCausalml estimates the causal impact of treatments on outcomes at the…
- ydfYDF trains, evaluates, and interprets decision forest models (Random…
- fprime-fppFPP is a modeling language and compiler for the F Prime flight…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also causallib · econml · dowhy · cem · google-meridian · empirical-calibration · psmpy · pgmpy · pyfixest