Hi all,
I'm a senior at Northwestern University looking for a senior thesis project to graduate
with honors in Data Science. I loved using tidymodels in my machine learning in R
courses, and I'd like to contribute something back to the community that has given me
so many resources for fun projects.
The idea: an extension package for estimating heterogeneous treatment effects (CATE) with
causal meta-learners (S-, T-, X-, R-, and DR-learners), where any tidymodels workflow can
serve as the base learner. To be clear, I mean meta-learners in the causal inference sense,
not the stacking sense used in stacks.
What I've checked so far:
- CRAN CausalInference task view: bartCause, stochtree, hettx, FindIt, grf, subdetect,
EffectTreat, evalITR, CRE, stepp, tools4uplift, none built on tidymodels - Other R packages with meta-learners: rlearner, StratifiedMedicine, and
DeepLearningCausal, each tied to its own set of base learners - parsnip's grf engine: covers classification, regression, and quantile regression,
but not causal forests - r-universe, GitHub, and this forum: nothing combining meta-learners with tidymodels
- Python: CausalML and EconML offer this through a consistent API, which is roughly
what I'd like to match
You can hand-build meta-learners from separate workflows today, but cross-fitting, uplift
metrics (Qini, AUUC), and tuning for effect estimation all have to be coded by hand.
My questions:
- Does anyone know of an existing package or work in progress that does this?
- Would there be interest in an extension package? The rough plan: learner functions that
accept any workflow, automatic cross-fitting via rsample, tidypredict()output, and
yardstick-style uplift metrics. - For the tidymodels team: I've read the parsnip dev checklists, but a meta-learner seems
less like a new model or engine and more like a layer over existing workflows, similar
to stacks. Would a standalone package in that style be the right structure, or would
you recommend something different?
A sketch of the interface I have in mind:
cate_fit <- x_learner(
outcome_model = xgb_wflow,
propensity_model = glm_wflow,
treatment = "w"
) |>
fit(data = train)
predict(cate_fit, new_data = test)
Thanks for any guidance!