cleverly.LearnedRuleValue#
- class cleverly.LearnedRuleValue(rule: ~cleverly.interventions.learned.LearnedRule = <factory>)[source]#
Request the fold-average value of a treatment rule learned inside each training fold.
The target is data-adaptive. It is the average over the outer folds of the value of the rule learned on each fold’s training rows, so it depends on the realized split and on the fitted rules. It is not the value of one rule fitted on all rows, and it is not the value of the optimal rule. Van der Laan and Luedtke (2015), Section 7 and Appendix B, define it and its cross-validated TMLE. The interval can under-cover when the effect is zero or near zero for a share of units, where no limiting rule exists.
The fit needs the fold-evaluated CV-TMLE,
CrossFitting(enabled=True, fold_evaluation=True). The defaultCrossFitting()refuses before any learner and names that remedy.- Parameters:
- rule
LearnedRule The rule class, and the label the reported parameter carries.
- rule
See also
cleverly.interventions.LearnedRuleThe rule this estimand holds.
RegimeMeanThe value of a known rule, fixed before the fit.
cleverly.CrossFittingThe fold-evaluated configuration this estimand needs.
Examples
>>> from cleverly import LearnedRuleValue >>> estimand = LearnedRuleValue() >>> estimand.name, estimand.rule.name ('ey_learned_rule', 'learned rule')
Methods#
Attributes#
- LearnedRuleValue.definition: str = "average over the outer folds of the value of the rule learned on each fold's training rows"#
- LearnedRuleValue.rule: LearnedRule#