med_bench.estimation.mediation_tmle
.TMLE#
Usage examples at the bottom of this page.
- class TMLE(regressor, classifier, prop_ratio, clip: float, trim: float, **kwargs)[source]#
Implementation of targeted maximum likelihood estimation method class
- cross_fit_estimate(t, m, x, y, n_splits=1)#
Estimate causal effect on data with cross-fitting
- Parameters:
array-like (y) – treatment value for each unit, binary
(n_samples) (shape) – treatment value for each unit, binary
array-like – mediator value for each unit, here m is necessary binary and uni- dimensional
(n_samples) – mediator value for each unit, here m is necessary binary and uni- dimensional
array-like – covariates (potential confounders) values
(n_samples (shape) – covariates (potential confounders) values
n_features_covariates) – covariates (potential confounders) values
array-like – outcome value for each unit, continuous
(n_samples) – outcome value for each unit, continuous