cleverly.interventions.RegimeSupport#

class cleverly.interventions.RegimeSupport(name: str, min_support_propensity: float, ratio_quantiles: dict[float, float], max_ratio: float, effective_sample_size: float, ess_ratio: float, tail_mass: dict[float, float], unsupported: int, score_load: _InterventionLoadRow | None = None, score_load_omission: str | None = None)[source]#

Overlap for one regime.

Parameters:
namestr

Report label of the regime.

min_support_propensityfloat

The smallest \(g_a(W_i)\) over the rows and arms the regime puts mass on. For a deterministic rule that is \(\min_i g_{d(W_i)}(W_i)\), the number a reader of a dynamic regime wants first.

ratio_quantilesdict of float to float

Quantiles of the density ratio \(g^\star(A \mid W)/g(A \mid W)\) at the observed treatment – the clever covariate’s magnitude, before the missingness and intermediate mechanisms enter it.

max_ratiofloat

The largest such ratio: how much one row can move the estimate.

effective_sample_sizefloat

Kish ESS of those ratios, and ess_ratio its share of n. A regime far from the observed mechanism throws away information even when nothing is formally violated, and this is the size of that loss.

ess_ratiofloat

The effective sample size as a share of n.

tail_massdict of float to float

Fraction of rows whose assigned-arm propensity falls below each threshold.

unsupportedint

Rows where the regime assigns positive probability to an arm with an estimated propensity of exactly zero – a structural violation rather than a practical one. The parameter is not identified for those rows at all.

score_load_InterventionLoadRow or None

Concentration of the fitted abs(w_i * H_ij) values for this regime’s score equation, and the cross-fitting draw it describes. None means the fitted artifact cannot supply the exact values. The twelve keys are equation, n_total, n_targeted, effective, targeted_ratio, total_ratio, top_1pct, top_5pct, max_load, zero_load, reported_repeat and n_repeats.

score_load_omissionstr or None

Machine-readable reason why score_load is unavailable.

Methods#

Attributes#

RegimeSupport.score_load: _InterventionLoadRow | None = None#
RegimeSupport.score_load_omission: str | None = None#
RegimeSupport.name: str#
RegimeSupport.min_support_propensity: float#
RegimeSupport.ratio_quantiles: dict[float, float]#
RegimeSupport.max_ratio: float#
RegimeSupport.effective_sample_size: float#
RegimeSupport.ess_ratio: float#
RegimeSupport.tail_mass: dict[float, float]#
RegimeSupport.unsupported: int#