cleverly.interventions.IncrementalSupport#
- class cleverly.interventions.IncrementalSupport(name: str, delta: tuple[tuple[str, float], ...], guaranteed: tuple[float, float], min_propensity: float, max_ratio: float, effective_sample_size: float, ess_ratio: float, score_load: _InterventionLoadRow | None = None, score_load_omission: str | None = None)[source]#
Overlap for one tilt – which for this estimand is a statement, not a warning.
The clever covariate is bounded by \(\min\delta/\max\delta\) and \(\max\delta/\min\delta\) however small the mechanism gets, so
guaranteedis what the tilt promises before seeing any data andmax_ratiois what it delivered. The two agreeing is the normal case; the report exists so that a reader can see the effective sample size stay near \(n\) where an arm-indexed fit’s would have collapsed.This row is hashable and its two siblings are not, and that difference is deliberate.
RegimeSupportandPolicySupportcarry quantile mappings that are part of what makes one of their rows different from another, so neither has ever had a hash. This row’s identity is the declared tilt and what the data did with it, all of which was hashable untilscore_loadwas added. That field holds adict, so adding it made every fitted row of this class raiseTypeError: unhashable type: 'dict'while an omitted row, whose field isNone, still hashed. Declaring the fieldhash=Falserestores the hash rather than preserving one.compare=Falsewould have gone too far: two tilts that differ only in their fitted score load are different rows and still compare unequal, and only thedictleaves the hash.- Parameters:
- name
str Report label of the tilt.
- delta
tupleoftuple (label, factor)for every level, in arm-code order: the resolved factors this row describes.- guaranteed
tupleoffloat (min factor / max factor, max factor / min factor): the bounds the clever covariate cannot leave, whatever the mechanism does. A property of the declared tilt alone: no data went into it.- min_propensity
float Smallest estimated \(g(a \mid W)\) over rows and levels, for comparison with an arm-indexed fit rather than because this estimand divides by it.
- max_ratio
float Largest clever covariate the data produced.
- effective_sample_size
float Kish effective sample size of those weights.
- ess_ratio
float That size as a share of
n.- score_load
_InterventionLoadRoworNone Concentration of the exact absolute score weights retained for this tilt’s outcome equation, and the cross-fitting draw it describes.
Nonemeans the artifact did not supply a usable column. The twelve keys areequation,n_total,n_targeted,effective,targeted_ratio,total_ratio,top_1pct,top_5pct,max_load,zero_load,reported_repeatandn_repeats.- score_load_omission
strorNone Machine-readable reason why
score_loadis unavailable.
- name