Skip to content
Increment 0.1.0a6 prerelease documentation. These docs describe the increment 0.1.0a6 prerelease (v0.1.0a6). Its API may change. Install: pip install 'increment==0.1.0a6' Keep any extras requested by the guide, such as increment[dashboard]==0.1.0a6.

Exploratory multiplicity

Use select_exploratory_family to correct eligible whole-window and segment results together. It accepts only uncorrected fixed-horizon decision rows.

Family membership and interval details

select_exploratory_family corrects whole-window LiftEstimate rows and segment BreakoutEstimate rows as one Benjamini-Hochberg family at FDR level q. Each returned row records discovery, family_axes, family_q, family_threshold, and family_size. A selected row’s interval is reissued at Benjamini-Yekutieli level 1 - R*q/m, capped at its nominal level, and matches the breakout view’s row for the same cell under AnalysisPlan(view_multiplicity=MultiplicitySpec(correction="bh", q=q)). Unselected rows keep nominal intervals.

Rows retain canonical family_procedure ("bh", "e_bh", or "bonferroni"). Older serialized rows without this field remain None; presentation reports it as unrecorded rather than inferring it.

Every refusal names offending rows in its rows context:

CombinationClassification
Mean, ratio, and CUPED rows (Wald log interval)Supported: reissued from persisted statistics and reference.
Conversion and retention (exact binomial)Supported: reinverted from persisted counts; one-sided geometry is kept.
Clustered ratio (Fieller set)Supported: reinverted from persisted joint reference.
No relative interval (non-positive arm mean), selected by an absolute margin or additive evidence against zeroSupported: additive interval uses persisted abs_diff, abs_se, reference, and abs_alpha, never narrower than nominal. Rows serialized before abs_alpha are refused with estimation.family.exploratory_construction.
Breakout segments and whole-window rowsSupported: one family across metric, arm, and segment.
Design-excluded cells (a missing arm, or fewer than two units in an arm under a method that estimates its variance; exact-binomial conversion and retention rows stay eligible at one unit)Not hypotheses; returned unchanged outside the family. Outcome-based exclusions, including a control arm lost to a non-positive mean, remain in m as non-rejections and are never selected.
Informative priorPosterior fields may change; selection uses persisted sampling evidence. Prior-bound rows without a proven sampling-availability marker refuse with readout.legacy.sampling_unreconstructible.
Sequential inferenceUnfinished; refused with estimation.family.exploratory_sequential.
Quantile, percentile-winsorized, and additive-scale rowsUnfinished; refused with estimation.family.exploratory_construction because intervals cannot be reissued without approximation.
Already-corrected, sensitivity, or day-axis rowsRefused with estimation.family.exploratory_pre_corrected, estimation.family.exploratory_non_decision, or estimation.family.exploratory_row.
select_exploratory_family(rows, q)

Correct whole-window and segment decision rows as one Benjamini-Hochberg family.

rows are uncorrected LiftEstimate rows (one per metric and arm) and BreakoutEstimate rows (one per metric, arm and segment). Every decision row is one hypothesis of a single family at FDR level q; the rows come back in the same order and types. Each carries discovery, family_axes (("metric", "arm"), plus family_q, family_threshold (the realized R*q/m, None when nothing is selected), family_nominal_alpha (the original level for selected rows and their reissue cap), and family_size (m). Only selected rows are reissued and carry a nominal alpha.

Selection is select_family over each member’s family evidence — the p-value the estimators themselves emit, which for a delta-route conversion row is the composite of its persisted counts rather than its delta p-value — so discovery equals bh_select on that evidence, ties at the threshold included. A selected row’s interval is reissued at the Benjamini-Yekutieli level 1 - R*q/m, capped at the row’s own nominal level, from the construction the row persists: the Wald interval from its raw statistics and reference, the exact binomial set from its counts, or the Fieller set from its joint reference, each with its one-sided geometry. That equals the interval run_breakout(correction="bh") returns for the same cell. A delta-route conversion row is read as a family member: its persisted counts give the composite p-value the family selects on (read on demand here, carried on every tested row), and a selected one is reissued by those counts at the corrected level, the exact binomial set where they are not dense there — again what run_breakout(correction="bh") reports. A row whose relative interval is unavailable (a non-positive arm mean) reports only its additive interval; an absolute margin can select it, and that interval is reissued from its persisted abs_alpha at the same level, never narrower than the nominal one. An exact binomial margin row saved with Wald additive bounds is read with the score interval its own level cuts, selected on that score test and returned with it. Any other unselected row keeps its interval.

A cell excluded for an outcome-based reason (zero variance, non-positive mean, extreme ratio) stays in m as a non-rejection, as in run_breakout. A cell excluded by design (too few units, no control arm, no treatment arm) is no hypothesis: it is returned unchanged, outside the family.

The call refuses before any work, naming every offending row: rows that are not whole-window or segment rows (estimation.family.exploratory_row), rows already corrected (estimation.family.exploratory_pre_corrected), sensitivity rows (estimation.family.exploratory_non_decision), sequential rows (estimation.family.exploratory_sequential), and rows whose interval cannot be reissued without approximation (estimation.family.exploratory_construction: quantile, percentile winsorized, additive-scale and similar constructions, and an additive-only interval whose abs_alpha was not persisted). A cell whose evidence is unavailable for any other reason refuses the family as run_breakout does (family.evidence.incomplete). An empty input returns ().

exploratory_family_exclusion applies the same admissibility test to one row and returns the reason it cannot join the family, or None. Exclude ineligible rows and report the returned reason instead of refusing the whole family; refusal context uses the same values in reasons or constructions. One-sided (greater/less) Wald, exact binomial and Fieller rows are reissued exactly, with their one-sided geometry, and are not excluded.

exploratory_family_exclusion(row)

Why row cannot join an exploratory family, or None when it can.

This is the predicate select_exploratory_family applies, so a caller can leave an excluded row out of the family and report the reason instead of letting one hazardous cell refuse every cell. The string is the reason the refusal carries in its reasons context (constructions for an interval that cannot be reissued). A cell excluded by design (too few units, no control arm, no treatment arm) is not excluded here: the family returns it unchanged.