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}, where Qbar_v is fitted on the training rows of fold v. 1 and 0 stand 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 density method, so it never enters interventions= as a known regime. Pass it as TMLE(learned_rule=LearnedRule()) or LearnedRuleValue(rule=LearnedRule()).

Parameters:
namestr

The label that the reported parameter carries, as in ey_learned_rule[learned rule].

See also

cleverly.LearnedRuleValue

The typed estimand that holds this rule.

cleverly.interventions.Rule

A known rule, fixed before the fit.

Examples

>>> from cleverly.interventions import LearnedRule
>>> LearnedRule().name
'learned rule'

Methods#

Attributes#

LearnedRule.name: str = 'learned rule'#