cleverly.interventions.LearnedRule#
- class cleverly.interventions.LearnedRule(name: str = 'learned rule')[source]#
Declare the rule whose fold-average value a fit estimates.
The rule is learned inside each outer training fold. Version one has one rule class: the plug-in rule of the fit’s own outcome regression,
d_v(w) = 1{Qbar_v(1, w) - Qbar_v(0, w) > 0}, whereQbar_vis fitted on the training rows of foldv.1and0stand for the higher and the lower of the two sorted arm codes, so a tie assigns the lower arm code. The rule needs no learner beyond the outcome regression, and no fit beyond the cross-fitted nuisances.The object has no
densitymethod, so it never entersinterventions=as a known regime. Pass it asTMLE(learned_rule=LearnedRule())orLearnedRuleValue(rule=LearnedRule()).- Parameters:
- name
str The label that the reported parameter carries, as in
ey_learned_rule[learned rule].
- name
See also
cleverly.LearnedRuleValueThe typed estimand that holds this rule.
cleverly.interventions.RuleA known rule, fixed before the fit.
Examples
>>> from cleverly.interventions import LearnedRule >>> LearnedRule().name 'learned rule'