causal-estimation
Use this sub-skill for classical causal effect estimation with CausalML 0.17.0: S/T/X/R/DR meta-learners, TMLE ATE estimation, instrumental-variable estimators, propensity-score contracts, argument-order migration, DataFrame/Polars handling, and joblib-backed learner serialization.
Route by question type
- Meta-learners and CATE/ATE: use references/meta-learners.md.
This includes
BaseSRegressor,BaseSClassifier,BaseTRegressor,BaseTClassifier,BaseXRegressor,BaseXClassifier,BaseRRegressor,BaseRClassifier,BaseDRRegressor,BaseDRClassifier,LRSRegressor,XGBTRegressor,XGBTClassifier,MLPTRegressor,XGBRRegressor,XGBRClassifier, andXGBDRRegressor. - TMLE, IV, DRIV, and persistence: use
references/iv-tmle-serialization.md.
The current IV entry point is
IVRegressor; the current DRIV entry points areBaseDRIVLearner,BaseDRIVRegressor, andXGBDRIVRegressor. - Input contracts and migration details: use
references/api-contracts.md before writing code
that passes
treatment,y,p,assignment,w, orpZ. - Error diagnosis: use references/troubleshooting.md.
Cross-route to sibling sub-skills
- Use ../tree-models/ for
CausalTreeRegressor,CausalRandomForestRegressor,UpliftTreeClassifier,UpliftRandomForestClassifier, tree fill/prune, and tree visualization. - Use ../deep-models/ for TensorFlow, Torch/Pyro, or JAX neural estimators such as DragonNet and CEVAE.
- Use ../analysis-and-decision/ for AUUC/Qini/gain curves, validation scoring, sensitivity analysis, feature selection, policy learning, and counterfactual value optimization.
- Use ../data-preparation/ for synthetic data, propensity-model construction, matching, feature utilities, and matched-data QA.
Always apply these defaults
- Prefer keyword arguments for all public estimator calls:
fit(X=X, treatment=treatment, y=y, ...), not positionalfit(X, treatment, y, ...). - Check
control_nameand treatment labels before fitting. Output columns are ordered aslearner.t_groups, which is the sorted set of non-control treatment groups. - Treat
pas a strict probability contract: values must be inside(0, 1), arrays/Series are only for a single non-control group, and multi-treatment runs need dictionaries keyed by treatment group. - Use
fit_predictonly on learners that expose it.TMLELearnerexposesestimate_atebut notfit_predict;IVRegressorexposesfitandpredict; DRIV learners expose bothfit_predictandestimate_ate. - Keep persistence on fitted learners:
learner.save(path),ClassName.load(path), or genericload_learner(path). Do not assumesave_modelorload_modelfunctions exist for these classical estimators.
