Choosing an Estimator#
CausalML implements many estimators because no single one dominates: they differ in the outcome and treatment types they accept, the data they are designed for, and what they report. This page maps a problem to a shortlist. The mathematics of each method lives in the Methodology; the API details live in the API Reference.
Start from the data#
Was the treatment randomized?
Yes, and compliance was perfect. Any estimator below applies, and the assignment probability is known – pass it as
pinstead of estimating it. For a binary conversion outcome where the goal is targeting segments or interpretable rules, start with the uplift trees. For per-unit CATE estimates with confidence intervals, start with the meta-learners.Yes, but some units did not comply. The randomized assignment is an instrument for the treatment actually received. Use the DRIV learner (
BaseDRIVLearner) to estimate the effect on compliers, or 2SLS for a linear model.No – the data are observational. Estimation requires that every confounder (a variable driving both treatment and outcome) is measured, and that treated and untreated units overlap (see Checking Overlap). Prefer the estimators that model the treatment assignment explicitly: the X-Learner, R-Learner and DR learner all accept a propensity score
pand estimate one internally when it is omitted. Validate with sensitivity analysis afterwards.No, and an important confounder is unmeasured. With an instrument, use the IV estimators above. With proxy variables for the hidden confounder, CEVAE models it as a latent variable. Without either, no estimator in this package (or any other) identifies the effect.
What do you need out of the model?
Only the average effect (ATE) – TMLE, IPTW, matching, or any meta-learner’s
estimate_ate().Per-unit effects (CATE) – meta-learners, causal trees and forests, or the neural models.
Segments and rules you can read – uplift trees, with visualization.
Who to treat under constraints – estimate CATE first, then use
PolicyLearneror the value optimization methods.
Capability matrix#
Estimator (classes) |
Outcome type |
Treatment |
Observational data |
Uncertainty |
Extra install |
|---|---|---|---|---|---|
S/T/X/R meta-learners ( |
continuous ( |
binary or multiple discrete |
yes; X/R use a propensity score |
ATE CI; bootstrap CATE CI |
– |
DR learner ( |
continuous or binary |
binary or multiple discrete |
yes, doubly robust |
ATE CI; bootstrap CATE CI |
– |
DRIV learner ( |
continuous |
binary, with an instrument |
yes, given an instrument |
ATE CI; bootstrap CATE CI |
– |
Uplift trees ( |
binary or multi-class |
binary or multiple discrete |
designed for randomized data |
– |
– |
Causal trees ( |
continuous |
binary |
yes |
ATE CI (tree); per-prediction variance (forest) |
– |
|
continuous or binary |
binary |
yes |
– |
|
|
continuous or binary |
binary |
yes, with proxies for a hidden confounder |
– |
|
2SLS ( |
continuous |
continuous or binary, with an instrument |
yes, given an instrument |
coefficient SE |
– |
|
continuous |
binary |
yes, with a propensity score |
ATE CI |
– |
How the uncertainty is computed, per estimator, is cataloged in Uncertainty Quantification.
Two rules of thumb#
Start simple, then justify complexity. A T-learner with a linear base learner is a transparent baseline; adopt a more flexible estimator when held-out evaluation (Validation) shows it ranks units better.
Do not choose by in-sample fit. CATE models cannot be scored against an observed label. Compare candidates with the validation losses and ranking metrics on held-out data, as described in Model Selection with Validation Losses.