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.

Results (`increment.results`)

Sitewide behavior is exposed through increment.estimators.sitewide(experiment, reader, metric=...), with output values available from the receive-only results namespace.

sitewide(experiment, reader, metric, population="assigned") reports an assigned intent-to-treat whole-site impact, including when the experiment declares a trigger. For triggered experiments, population="triggered" reports a conditional impact scaled to enrolled units in finalized trigger membership. Both populations require an unwindowed metric whose components use sum or count aggregation. Conversion metrics refuse with facade.analysis.sitewide_metric_unaligned before evidence is loaded because the converter indicator is not additive across events; declare a count metric on the conversion fact to read conversion events site-wide. Windowed and other non-additive aggregations use the same refusal. Triggered sitewide additionally requires a declared experiment end. It uses calendar-window outcomes (not run()’s trigger-anchored windows) and discloses membership assumptions, allocation-balance evidence, provenance, and its exploratory unadjusted multiplicity status on the result. SitewideImpact and SitewideRatioImpact include analysis_population, window, membership_cutoff, snapshot_id, scaled_units, unobserved_members, assumptions, allocation_balance, and allocation_balance_unavailable_reason (the integrity code when a triggered balance cannot run because allocation is undeclared). The paired-provenance check is content-bound only for artifacts; native snapshot_id reflects declared SourceSnapshotEvidence, not table contents.

increment.results.LiftEstimate.family_procedure identifies the canonical correction procedure retained with the result’s family (e_bh, bonferroni, or bh), when applicable. Its read-only reason exposes only the persisted reason for a coded cell failure (the context reason, or the failure code); it does not combine other unavailable sampling or interval reasons.

Estimate

A number with quantified uncertainty.

lb/ub (when set) represent an interval at level confidence. open_side names an unbounded endpoint of a one-sided interval.

value : float Point estimate. lb, ub : float | None Interval bounds. Closed intervals set both; open intervals leave the endpoint named by open_side unset. open_side : {“lower”, “upper”} | None Unbounded endpoint for a one-sided interval, or None for a closed or unavailable interval. level : float | None Confidence/credible level, e.g. 0.95. Required iff lb/ub are set. At extreme alpha values this may round to 1.0; alpha retains the exact allocated noncoverage budget. alpha : float | None Allocated noncoverage budget; level is its nominal complement. Fixed open endpoints use this full quantile tail. Sequential open endpoints retain the symmetric parent budget, without a fixed-time tail interpretation. Attained coverage may be higher than nominal. Unlike level, it remains recoverable when the confidence level rounds to 1.0. log_mean, log_se : float | None Point estimate and standard error on the natural-log scale. Set by infer_lift to the raw pre-prior statistics, not the posterior mean/sd - the two differ under an informative prior.

LiftEstimate

A lift estimate, carrying the metadata to identify which (metric, method, group) and its persisted inference reference.

value is the prior-free sampling estimate: exp(log_mean) - 1 for scale="log" or log_mean for scale="linear". The CI is the corresponding sampling interval on this scale. Posterior estimates and decision probabilities are persisted separately and never replace the sampling estimate or interval.

Normal posterior latent parameters are stored separately from the sampling interval. A mixture posterior is stored exactly in posterior_components as equal-length weights, means and sigmas tuples, in component order. Zero-weight components are retained with their original means and sigmas so persisted positions are stable; weights are validated but never normalized. prior_spec remains the declared Student-t/mixture prior and is not used to reconstruct the already-updated posterior.

reference_kind persists the reference: “normal”, “t”, “sequential”, “binomial”, or “confidence_set”. Winsor confidence sets persist raw construction state and endpoint statuses, expose no posterior, and reinvert through reintervalize(alpha). Their public confidence_set.qualification names the construction that ran: pointwise_asymptotic_model_conditioned_v1 (bootstrap candidate), pointwise_asymptotic_influence_v1 (analytic influence interval) or uniform_support_conditioned_v1 (rank method); none is an unqualified finite-sample promise. Bootstrap p-values invert stored roots; analytic p-values are the two-sided normal tail of the stored pivot; rank p-values are alpha when the set excludes the null, else one. dof retains cluster degrees of freedom, so dof=None does not imply Normal inference: a Welch reference has its own reference_df. Relative t p-values use this reference; posterior-derived stats refuse it.

inference labels the interval semantics: “fixed” is a single-look interval; “always_valid”/“asymptotic_mean” are valid at every look. value carries no stopping adjustment (winner’s curse); the interval endpoints are the safe summary. Decision-stat methods refuse on any non-”fixed” inference.

value_scale="absolute" marks a row whose value is not a relative lift at all - an encouragement design’s additive LATE, or an observational metric reported additively.

BinomialConfidenceSet

A typed relative-lift confidence set from the exact independent- binomial risk-ratio method (see binomial_rr.py).

Persisted on EVERY reference_kind="binomial" row — including a point-backed one — as the sufficient-count/method provenance LiftEstimate.stat_sig()/p_value() recompute a shifted-null verdict from; used as the row’s ONLY confidence-set representation when no finite point exists (x_c == 0: the empirical ratio has a zero denominator), in which case LiftEstimate.lift is None.

lower/upper are on the LIFT scale (R - 1), matching Estimate.lb/ub elsewhere in this module. upper is None means genuinely unbounded (no finite ceiling exists in the identified set, e.g. an observed zero control count) — never serialized as infinity. lower is never None: the relative-lift scale’s natural floor, -1 (R = 0), is always a legitimate finite value, attainable and closed.

method is required and names the construction the endpoints were cut under, nuisance stop rule included. numerical_qualification records that a newly produced finite-sample construction depends on the deployed SciPy/Boost error allowance; it is not a cross-build proof. Rows saved before that field existed default to legacy_unrecorded_v1, which makes no arithmetic qualification claim. LiftEstimate.stat_sig()/p_value() recompute from the counts with the current rule, so a set cut under another construction would sit beside a verdict its own interval can contradict. A set that names another construction or qualification is refused when read.

WinsorConfidenceSet

A confidence region, with an explicit qualified reference contract.

Bootstrap regions are pointwise/model-conditioned asymptotic candidates, influence regions are pointwise normal-approximation candidates, and rank regions are support-conditioned. method names the construction that ran, which a size-routed request only fixes after the pool is known.

WinsorInferenceSpec

Prospectively fixed inference law; stream is independent of outcome sampling.

qualification is part of the persisted public contract. The default size route selects the analytic influence interval for large pools and the positive-log bootstrap otherwise; both are pointwise asymptotic candidates, not universal finite-sample guarantees. The executed method is recorded on the reference and the confidence set.

BootstrapReference

No docstring.

InfluenceReference

Analytic influence-function interval with normal quantiles.

scaled_density is the pooled outcome density at the observed cutoff multiplied by the cutoff: the arm-wise log kernel on positive outcomes, weighted by each arm’s positive share, in the dimensionless form the studentization consumes, so it stays representable at any outcome scale. Both standard errors are the centred empirical influence variance over every pool arm, including the estimated cutoff, the estimated zero shares and their cross term.

RankReference

No docstring.

WinsorPermutationTest

Conditional sharp-null test, never a heterogeneous effect interval.

IndependentMeanComponent

One unweighted independent iid mean, with centered squared deviations.

IndependentMeanReference

Welch components and the requested inference contract.

Alpha is the caller’s tail budget. Directional central displays use doubled alpha; directional-FCR displays spend that display budget on the single finite endpoint. Adjusted scores use a separate reference.

SetEndpoint

No docstring.

SetInterval

No docstring.

SwitchbackAssignmentDiagnostic

Construction-time schedule and assignment integrity evidence.

ct_cycles/tc_cycles count the realized independent CT/TC order draws: one per unit-cycle under independent_bernoulli_order, or one per two-period block (shared by the whole roster) under shared_schedule. n_blocks is None for the unit-cycle law and the declared block count for a shared schedule. n_units is always the fixed roster size, never the inferential replicate count for a shared law.

SwitchbackPowerResult

Immutable power result with a separate reason for every numeric null.

mde_abs is the absolute favorable effect delta, not a standardized or relative lift. Achieved-power and required-N leave it null with mde_unavailable_reason='not_requested'; there is no default target. Full assignment/window, labels, assumptions and decision metadata are retained in baseline and procedure and in their JSON serialization.

UnitCycleFailureCount

No docstring.

UnitCycleLawMoments

Population moments; correlation is undefined if either SD is zero.

UnitCyclePowerLowerBoundResult

No docstring.

UnitCycleModelPowerResult

Certified and possible successful rejections of the sufficient-state adapter.

power is null if admitted numerical evaluation is incomplete. Split-refused draws are known non-rejections even if their innovations also failed numerically. rejected counts successfully evaluated, admitted rejections.

UnitCycleModelMdeResult

Selection-safe certification over an explicitly declared effect grid.

The grid is normalized to immutable binary64 values and ordered from the procedure null in the favorable direction. All candidates use one experiment stream; the per-effect error allocation protects selection.

UnitCycleModelRequiredUnitsResult

Every N from 1 through max_n is checked; no monotonicity is assumed.

AllocationBalance

Descriptive triggered-population allocation-balance evidence.

PolicyValueContrast

Fixed-horizon contrast Delta_T = V_T(target) - V_T(reference) on the reward scale.

ess_by_time is the smaller of the two policies’ effective sample sizes at each decision index and max_weight_by_time the larger of their maximum cumulative weights; the per-policy tuples carry both. The interval is a two-sided Wald interval from the unit-clustered sandwich standard error with a t reference on n_units - 1 degrees of freedom.

AnalysisEnvelope(cells, metadata)

No docstring.

ResultCell(identity, label, family, source_snapshot_id, components, provenance, summary, projection_fields, row_kind, row_payload, posterior_queries)

No docstring.

ReadoutResults

Versioned saved-result boundary; decoding returns the existing collection.

increment.results.ReadoutResults loads the modules that register collections.

Binomial rows persist binomial_set.numerical_qualification: scipy_special_function_error_model_conditional_v1 states the finite-sample arithmetic qualification conditional on the deployed SciPy/Boost special-function error model, not a cross-build proof. Supported rows saved before this field was introduced load as legacy_unrecorded_v1, which makes no arithmetic qualification claim.

JointContrastReference

Working joint reference for the additive numerator and denominator.

RelativeConfidenceSet

Outward-enclosed Fieller set under an explicitly approximate joint reference.

LiftEstimates

list[LiftEstimate] with .to_frame(): the whole-window lift rows of a run.

BreakoutEstimate

A lift estimate for ONE segment (dimension value) of a breakout.

Carries the same identity fields as LiftEstimate (via _RowIdentity) plus dimension/dimension_value to identify the segment and source to disambiguate the rare same-name, different-source case.

reference_kind/reference_df preserve the source row’s sampling reference through serialization. A Welch t reference can have dof=None; it must not be reconstructed as a Normal interval.

run_breakout returns one row per (segment, metric, method, non-control arm) cell, dense - an unestimable cell still gets a row, with lift=None and excluded naming why (see :data:ExclusionReason).

low_reliability flags a real estimate whose control or treatment arm has fewer than reliability_floor units: a caveat on an approximate interval’s coverage that leaves its verdict unchanged.

Call .to_frame() on the :class:BreakoutEstimates this returns rather than constructing a plain list[BreakoutEstimate].

BreakoutEstimates

list[BreakoutEstimate] with .to_frame() - :func:run_breakout’s return type.

DailyMetricValue

One arm’s absolute metric mean (with CI) for ONE day.

The time-series counterpart to a plain arm-level mean - what plots on a per-day chart of the raw value, as opposed to the relative lift between arms (see :class:DailyLiftEstimate). Produced by :func:run_daily directly from one daily_group_summary row.

dimension/dimension_value/source are populated together when :func:run_daily is given a dimension, and None otherwise.

ds_basis says what ds indexes: "calendar" (default) is an observation date; "cohort" means ds is the unit’s own exposure date, how a retention series is conventionally indexed.

Call .to_frame() on the :class:DailyMetricValues this function returns rather than constructing a plain list.

DailyMetricValues

list[DailyMetricValue] with .to_frame() - :func:run_daily’s return type.

DailyLiftEstimate

A relative lift estimate for ONE day of a daily time series.

Carries the same identity fields as :class:BreakoutEstimate and :class:~increment.estimation.results.LiftEstimate (via _RowIdentity) plus ds to identify which day’s slice of moments produced it.

estimand/value_scale/note mirror :class:BreakoutEstimate’s fields of the same name. ds retains calendar dates, numeric day indices, or structured string labels for as-of frame readouts. low_reliability marks a real estimate whose control or treatment arm has fewer than reliability_floor units that day; it is a caveat and leaves the verdict unchanged.

dimension/dimension_value/source are populated together when :func:run_daily_lift is given a dimension, and None otherwise. ds_basis - see :class:DailyMetricValue.

DailyLiftEstimates

list[DailyLiftEstimate] with .to_frame() - :func:run_daily_lift’s return type.

HeterogeneitySummary

One row per (analysis_population, metric, method, group_id, dimension, source, estimand, value_scale) grouping key: Cochran’s Q, DerSimonian-Laird tau^2, Higgins-Thompson I^2, and an HKSJ pooled effect, over the segments declared for that key.

scale is "relative" (log-RR) or "absolute" (risk difference) - the two frequently disagree, so both ship. value_scale is the upstream rows’ own value scale; scale is which of the two heterogeneity passes this row belongs to. tau2/i2/i2_lb/i2_ub are None whenever n_excluded_outcome > 0 for this (key, scale) row: an outcome-based exclusion biases tau^2, so it is suppressed rather than reported as trustworthy. q/p_value/pooled are not.

HeterogeneitySummaries

list[HeterogeneitySummary] with .to_frame() - see :class:~increment.breakout.estimates.EstimateList.

SegmentEstimate

One row per segment, scale, and estimator for a HeterogeneitySummary key, which includes analysis_population: two rows per estimable (segment, scale) (estimator="raw" and "shrunken"), plus an unavailable pair per excluded segment.

excluded is set from an upstream BreakoutEstimate.excluded, a live segment unusable on this scale only (excluded="zero_variance"), or a shrunken row withheld because that scale’s tau posterior could not be integrated within the numerical budget (excluded="estimation_failed").

raw reuses the segment’s own estimate (for scale="relative", BreakoutEstimate.lift verbatim). shrunken is the tau-marginalised posterior estimate, with its own shrink_k. baseline is the segment’s control-arm absolute mean, recovered from abs_diff and the raw log-scale lift.log_mean.

value_scale is the upstream rows’ own value scale; scale is which of the two heterogeneity passes this row belongs to.

role, discovery, family_axes, family_q, and family_threshold mirror the source BreakoutEstimate’s fields of the same name verbatim (see there) — a reader of this frame alone can otherwise not tell a discovery from a non-discovery, or a multiplicity-corrected interval from an uncorrected one. Both estimator rows for a segment carry the same source values.

SegmentEstimates

list[SegmentEstimate] with .to_frame() - see :class:~increment.breakout.estimates.EstimateList.

SegmentRolloutResult

:func:segment_rollout_recommendation’s return value - two independent, row-aligned-by-grouping-key result sets.

RolloutRecommendation

One row per (analysis_population, metric, method, group_id, dimension, source, estimand, value_scale) grouping key: which of that key’s segments to roll out, and an honest price on doing so.

UNWEIGHTED, and deliberately so: every value field treats each usable segment as an equal contributor regardless of exposure, so policy_value is a plain sum over the rolled-out segments, not traffic-weighted. An exposure-weighted variant was measured and dropped - its selection-bias correction did not meet the accuracy bar the unweighted correction is held to.

recommendation carries the estimator’s verdict verbatim: "rollout" (corrected value is positive), "no_net_benefit" (evidence cannot demonstrate positive value), or "refuse" (the offset guard fired - every value field is withheld).

rollout_cost is the relative-lift break-even actually used. k/n_excluded_design/n_excluded_outcome count how many of the declared segments the decision could and could not use, so a reported value can never silently understate its coverage.

RolloutRecommendations

list[RolloutRecommendation] with .to_frame() - see :class:~increment.breakout.estimates.EstimateList.

RolloutSegment

One row per segment declared for a :class:RolloutRecommendation key - dense: every segment of a key that ran appears, usable or not.

selected is the estimator’s subset membership on a usable segment, None on one this call could not use - populated even behind a "refuse" recommendation as evidence about the selection rule, not a deployable decision.

excluded is an upstream BreakoutEstimate.excluded, or "zero_variance" for a live segment whose log-scale statistic or variance is unusable here - the same tag segment_heterogeneity uses for its own per-scale drop.

estimand/value_scale identify the upstream rows’ own estimand and value scale; rows are grouped by both, so a family is priced on its own or not at all. A real LATE family (additive lift, no log-scale moments) never clears the pricing gate below.

RolloutSegments

list[RolloutSegment] with .to_frame() - see :class:~increment.breakout.estimates.EstimateList.

PowerResult

Result of a power-analysis solver.

n_per_arm : int Number of units in the treatment arm. n_total : int Total N across both arms. power : float Planned power at the computed / given sample size, under the model named by power_basis. For required_sample_size and achieved_power it describes the SUPPLIED effect; for minimum_detectable_effect it describes the returned effect’s implied absolute alternative, which can exceed the target when the answer is a domain endpoint. Enumerated binomial power is computed rejection mass: the point when its enclosure resolves maximum absolute error to 1e-6, otherwise the enclosure’s lower end (power_basis="lower_bound"). Either is conditional on the deployed SciPy/Boost special-function error model; this is not a cross-build proof, and it is not a confidence bound. Where the basis is "asymptotic", power is the planning model’s own value. power_lower, power_upper : float | None The computed enclosure of an enumerated binomial power: the runtime’s rejection probability lies in [power_lower, power_upper] conditional on the same error model, and power lies in it too. None for a closed-form or sequential plan. power_basis : {“asymptotic”, “exact”, “lower_bound”} How power was computed. "asymptotic" is the log-ratio planning model; "exact" is the runtime’s decision summed over the binomial count lattice with a resolved computed enclosure; "lower_bound" is the lower end of an enclosure the evaluation budgets leave wider than 1e-6, which sizing and detection decide from (a target is reached only when the lower end reaches it). numerical_qualification : {“closed_form_model_only_v1”, “sequential_crossing_quadrature_v1”, “scipy_special_function_error_model_conditional_v1”} Arithmetic scope accompanying the planning basis in saved results. Sequential asymptotic power uses its crossing quadrature; finite-sample enclosure claims, resolved or a lower bound, are conditional on deployed SciPy special-function error allowance, not uniform across builds. mde_relative : float | None Minimum detectable relative effect on the complier scale, expressed RELATIVE TO the declared null: (exp(distance) - 1) / baseline.compliance, where distance is the search’s own log-scale gap from theta0 = log1p(decision.null_lift). At compliance=1.0 this is exactly exp(distance) - 1; a lower compliance rescales it up. To recover the implied ABSOLUTE alternative, compose against the null rather than adding lifts: expm1(log1p(decision.null_lift) + log1p(mde_relative * baseline.compliance)) / baseline.compliance. Positive for two-sided and one-sided “greater”; negative for one-sided “less”. None when no minimum detectable effect exists at the design’s target power — a valid supplied-effect answer can still be reported then — with the cause in mde_unavailable_reason. Fixed-horizon binomial searches may skip a straddling band whose unprobed interior could already certify the target under the same budgets. The returned effect certifies its own target; it does not certify global minimality. mde_unavailable_reason : {“unattainable”, “unrepresentable”, “numerical_resolution”, “delta_method_unreliable”, “at_or_below_null_power”} | None Why mde_relative is None: the target power exceeds every admissible alternative’s power (unattainable), the admissible answer has no float64 representation (unrepresentable), the search could not resolve it within its numerical limits (numerical_resolution), every effect reaching the target has a planned combined log-scale standard error at or above the 0.5 at which the runtime’s relative-lift estimate refuses (delta_method_unreliable, the runtime’s own reason), or the target is at or below the null’s own rejection probability, so zero distance already reaches it and no strictly nonzero effect is the minimum (at_or_below_null_power). None whenever mde_relative is available; a missing effect always carries a reason. effective_var : float Per-unit variance for asymptotic planning, after the effective decision method’s CUPED / factor-absorption reduction and cluster design effect. Sensitivity-only CUPED receives no reduction, so this may differ from the caller’s Baseline.effective_var. Exact and approximate binomial plans report it as metadata; their power uses event rates and counts. For a QuantileBaseline, the per-unit variance its pilot’s standard error implies (see QuantileBaseline.from_control_values). n_clusters_per_arm : int | None Randomization clusters needed in the treatment arm, ceil(n_per_arm / baseline.avg_cluster_size). None under unit randomization. n_clusters_total : int | None Randomization clusters across both arms, ceiled per arm and summed (not ceiled once on n_total, since a part-cluster in each arm costs two whole clusters). None under unit randomization. n_triggered_per_arm, n_triggered_total : int | None Units actually entering a triggered analysis (n_per_arm/n_total times trigger_rate). None when no trigger_rate was declared; n_per_arm/n_total always count assigned units. expected_n_total : int | None Expected total N a sequential design stops at under the solved-for effect: E[T] * n_total, where E[T] charges each look’s first-boundary-exit mass its own information fraction and the never-crossing remainder the final planned look (see increment.power.sequential.sequential_expected_information_fraction). This is the honest economic counterpart to n_total (the worst-case, never-stops-early size) — early stopping is the entire argument for monitoring sequentially. None when no inference spec was given (a fixed-horizon design always runs to n_total). inference_to_declare : InferenceSpec | None The exact runtime InferenceSpec this plan assumed — pass it to InferenceSpec (or a YAML inference: block) at runtime declaration so the runtime’s boundary is tuned from the same N planning assumed. None for a fixed-horizon result. planned_metric_name, planned_quantile : str | None, float | None The metric name and quantile level a QuantileBaseline was built for (workflows.planning_baseline), echoed here so a caller who reuses one metric’s baseline to plan a different metric sees the mismatch stated in the answer instead of discovering it, if at all, from a silently mis-sized design. None for every non-quantile metric.

PowerCurvePoint

One evaluated point in a power or MDE curve.

mde_relative is None with mde_unavailable_reason set when no minimum detectable effect exists at that row’s size and target (see PowerResult); frames keep the column numeric with a null. power_basis names the planning model behind power and mde_relative, and power_lower/power_upper carry an enumerated enclosure, as on PowerResult. numerical_qualification is copied from that result and records the arithmetic scope of the reported model, not its statistical guarantee.

PowerCurve

List-like power-curve result with dict and dataframe conversion.

SRMResult

Result of an allocation sample-ratio-mismatch check.

fixed_p_value is the ordinary Pearson fixed-look p-value. log_e_value is the current uniform-Dirichlet mixture evidence for a predeclared allocation. inference states which quantity controls is_srm.

unassigned_units and mixed_assignment_units are accounting entries, not arms: they contribute no chi-square degree of freedom and appear in neither observed nor expected. mixed_assignment_units counts units observed in more than one arm, which shrinks every arm’s count symmetrically and so must be surfaced separately to be seen.

grain is "cluster" when randomization happened over clusters, so the chi-square belongs there; unit_counts then carries per-arm unit counts as descriptive context only (cluster size imbalance earns no degree of freedom). At grain="unit", unit_counts is empty.

min_expected_count is the smallest per-arm expected count (the minimum over arms of expected[k] * total), or None when unavailable. low_expected_count is True when that minimum falls below 5, the standard Cochran rule of thumb, flagging that the fixed asymptotic chi-square p-value may be unreliable there.

AllocationBand

A Beta posterior credible band on one arm’s allocation share at one ds.

Purely descriptive: unlike SRMResult, this carries no pass/fail flag - sample_ratio_mismatch is the actual gate. posterior_a/ posterior_b are the Beta parameters the interval was derived from, carried so a caller can reconstruct the full posterior (they cannot be recovered from n/n_total alone without the prior, a call-site argument).

ExperimentHealth

Frozen collection of health checks; deliberately has no aggregate verdict.

HealthCheck

One identity-preserving source-health observation, never a ship verdict.

NotApplicable

A diagnostic check that does not apply to the current design.

Returned in place of a check’s normal result (e.g. SRMResult) when the design makes the check meaningless - a sample-ratio test presumes a target randomized allocation an observational design does not have.

AbsorptionResult

The absorbed average treatment effect and its diagnostics.

effect is on the absolute scale (treated mean minus control mean, factor absorbed). When the effect is homogeneous across levels this is the ATE; when it varies, effect converges to the precision-weighted average of per-level effects (weights n_t * n_c / n_g, Angrist 1998), down-weighting skewed-allocation levels relative to the unit-weighted ATE.

icc is always the estimated variance-component ratio; mean_shrinkage is the pooling weight actually applied, pinned to 0.0 or 1.0 when pooling is forced rather than estimated - the two can disagree when pooling is not "partial".

ClusterScore

A pooled score keyed by canonical cluster identity, in canonical ID order.

CateScoreState

Immutable portable scoring basis, fitted centering and effect coefficients.

CateResult

A fitted Lin (2013) interacted regression.

ate is the treatment coefficient at the design centre (the weighted mean of the fitted treatment effects); se is its sandwich SE. Without clusters, se_unadjusted is Welch’s SE; with clusters it uses the same weights and cluster sandwich fitted on [1, d]. se_reduction reads the width the adjustment bought.

dimension, n_clusters (all observed IDs), immutable vcov and reference_df are the stored inference contract used by projections. Cluster intervals use t(K-1); the interaction Wald quadratic uses F(q, K-1) after division by q. The reference is cluster-asymptotic. unadjusted_vcov stores the separate two-column fit’s covariance. Unavailable required uncertainty refuses rather than returning a partial fit.

The state behind cate/contrast/score lives on excluded fields: a dumped result is report-only, so those need the live object. ate/se/lb/ub/heterogeneity are always the unpenalized fit’s; fit_cate(ard=True) only moves the interaction estimates, in beta_ard (None if ARD did not run).

Pass include_evaluation_population=True to CATE validation or targeting APIs to retain the immutable evaluation roster and its actual base weights. The default retains no identifiers. Read the snapshot from validation.evaluation_population, or from rule.validation.evaluation_population for fixed and selected rules. Selection captures only the outer evaluation split; its overlap provenance is independent of the inner selection population. Equal-cluster weights use retained cluster sizes after overlap trimming, before policy selection. Snapshot rows, cluster identities, and weights stay aligned through JSON serialization.

For synthetic validation, increment.simulate.cluster_dgp.evaluation_policy_truth(rule, population) consumes a saved rule and its ClusteredCATEResult. It returns exact policy truth and the retained-population ATE, using the stored IDs and actual base weights. Missing or mismatched evaluation rosters are refused, not reconstructed. This is truth for the same retained population, not an independent evaluation batch.

CateEvaluationPopulation

Immutable roster and weighting provenance for a reported evaluation.

CateValidation

Everything the held-out half says about a fitted CATE model.

passed is autoc.p_value < alpha; while false, the only defensible number is the average effect, holdout_ate - the effect on the same rows the groups and rank tests use. Randomized sources use a difference in means with a Welch SE; observational sources use the mean cross-fitted doubly robust score with its SE.

groups/clan intervals are Bonferroni-corrected across their own family (n_groups group intervals, len(clan) CLAN rows): a reader scanning every row for the one excluding zero pays the true familywise error, not the per-row nominal alpha (CDDF 2018). split_caveat names the single-split limitation this correction does not address. For declared clusters, top-level uncertainty_method, reference_df, and unavailable_reason describe the holdout ATE; each group/rank/CLAN row records its own bootstrap uncertainty. A missing AUTOC p-value closes the gate. Nuisances are frozen using training rows.

TargetingRule

A frozen deployment candidate and its honest-split evidence gate.

fraction is the requested budget; achieved_fraction is its realized holdout share under cluster_weight. Cluster policies pool scores, break ties by canonical ID and take the longest feasible whole-cluster prefix. Their threshold is descriptive, never a substitute for the prefix rule. Unit policies retain their frozen score cutoff.

predict applies this candidate to new columns without fitting again. recommendation is "target" only when the evidence gate passes; otherwise it recommends treating everyone alike based on the average effect. A passing, nonempty candidate reports its conditional policy effect and uplift as points only: this same holdout gates and reports them, so nominal intervals would be invalid after selection. Empty candidates retain null effects and their exact unavailable reason, rather than fabricated zeros.

TargetingSelection

A fraction chosen honestly, and the locked rule’s untouched-test verdict.

inner is the selection table: each grid fraction’s net benefit E[1{targeted}(tau - cost)] on inner units scored by models that never saw them, using IPW contributions for randomized sources and cross-fitted doubly robust scores for observational sources. selected_fraction is its argmax (ties to the smaller fraction), locked before the outer test is read. rule is the ordinary :class:TargetingRule evaluated once on the outer half. population records when overlap trimming restricts the inner selection and training population; it is independent of rule.population, which records trimming on the outer test. seed and the grid are pre-commitments: rerunning with a new seed until the answer improves is the failure mode this workflow prevents. Clustered bootstrap availability and valid-repetition metadata mirror the selected inner row; outer-test uncertainty remains on rule.

MetricTrend(table, metric, grain, window, week_start, denominator, start, end, by, alpha)

One metric’s calendar trend: a lazy ibis query plus metadata.

When MetricTrends.metric omits end, it resolves the selected metric’s fact horizon through a bounded aggregate over the bound warehouse relation at construction; no in-memory row is registered. The returned trend remains lazy and its default edge is a snapshot.

Columns (order not guaranteed, only names): metric, grain, window, period, [dims...], period_complete, n, value, ci_lb, ci_ub. n is the per-period unit denominator for entity-scoped metrics and NULL for total/active (an active metric’s count is its value). ci_lb/ci_ub are NULL for ratio (a point estimate only) and for total/active (no variance concept). grain keeps materialized rows self-describing across grains. window is the rolling trailing-day size (total/active only), NULL for every calendar-bucket trend.

period_complete is true once the metric’s own fact has any event at or past the period’s end (period_end <= max(fact ts)), so a period can be marked complete up to one partial day early. Fine for date-grain horizons; a consumer gating on the last complete period of a still-loading warehouse should ignore it or wait for the next load.

SitewideImpact

Whole-site impact of shipping a lift to every enrolled unit.

delta, delta_se : float Per-unit absolute lift of the target arm and its standard error. analysis_population : Literal[“assigned”, “triggered”] Assignment units by default, or finalized trigger members when population="triggered" was requested. treatment_group : str group_id of the target arm. n_control, n_treatment : float Control and target arm population sizes (float since a cluster grain population is K * mean cluster size, not an integer). n_enrolled : float Every enrolled unit across all arms (N_exp); equals n_control + n_treatment only when no other arm is enrolled. other_arm_ids : tuple[str, …] group_id of every other enrolled non-control arm, whose lift was netted out of baseline_volume. site_total_volume : float The observed site-window total this result was computed against. baseline_volume : float Counterfactual site-window total with nobody exposed to treatment. absolute_impact, absolute_impact_se, absolute_impact_lb, absolute_impact_ub : float Ship-to-all absolute impact, its SE, and its alpha-level interval. relative_impact, relative_impact_se, relative_impact_lb, relative_impact_ub : float Ship-to-all impact as a fraction of baseline_volume, its SE, and its alpha-level interval. alpha : float Two-sided significance level the intervals were built at. n_clusters : int | None None at iid grain, else the contrast’s total cluster count. absolute_dof, relative_dof : float | None None at iid grain (the Normal reference applies). Otherwise the dof absolute_impact’s and relative_impact’s own critical values were cut at - see “Degrees of freedom” in the module docstring for which reduction each is. They differ from each other, and both differ from the contrast’s pooled n_clusters - 2 once another arm is enrolled. window, membership_cutoff, snapshot_id : provenance fields Calendar outcome window, trigger-membership observation cutoff (None for assigned results), and source identity. Native identity reflects declared source snapshot evidence, not table contents; artifact identity is generation-based. scaled_units : int Units the impact scales (n_enrolled, rounded): every observed unit in the control, target and other co-enrolled arms. unobserved_members : int Members across the complete requested population roster omitted from outcome reduction. Triggered sitewide requires complete calendar coverage, so this is zero for supported triggered requests. multiplicity_status, adjustment : str Sitewide results are exploratory and unadjusted; triggered results do not inherit a registered analysis family. assumptions : tuple[str, …] Assumptions required to interpret the selected population. allocation_balance : AllocationBalance | None Descriptive triggered-population SRM evidence; it never gates a result. allocation_balance_unavailable_reason : str | None Integrity refusal code when triggered balance is unavailable because the design has no declared target allocation.

SitewideRatioImpact

Whole-site impact of shipping a ratio metric’s lift to every unit.

Ratio metrics need two per-unit lifts (numerator, denominator) instead of :class:SitewideImpact’s single delta, hence a separate model. See “The ratio math” in the module docstring for the derivation.

delta_num, delta_num_se : float Per-unit absolute lift of the target arm’s numerator and its SE. delta_den, delta_den_se : float Per-unit absolute lift of the target arm’s denominator and its SE. delta_cov : float Covariance of delta_num and delta_den. analysis_population : Literal[“assigned”, “triggered”] Assignment units by default, or finalized trigger members when population="triggered" was requested. treatment_group : str group_id of the target arm. n_control, n_treatment : float Control and target arm population sizes (see :class:SitewideImpact for why this is a float). n_enrolled : float Every enrolled unit across all arms (N_exp). other_arm_ids : tuple[str, …] group_id of every other enrolled non-control arm, whose numerator and denominator lifts were netted out of the baselines. site_total_numerator, site_total_denominator : float The observed site-window totals this result was computed against. baseline_numerator, baseline_denominator, baseline_ratio : float Counterfactual site-window totals with nobody exposed to treatment (N0, D0), and their ratio. shipped_numerator, shipped_denominator, shipped_ratio : float Ship-to-all site-window totals (N1, D1), and their ratio. absolute_impact, absolute_impact_se, absolute_impact_lb, absolute_impact_ub : float Ship-to-all absolute impact (shipped_ratio - baseline_ratio), its delta-method SE, and its alpha-level Wald interval. relative_impact, relative_impact_se, relative_impact_lb, relative_impact_ub : float Ship-to-all impact as a fraction of baseline_ratio, its delta-method SE, and its alpha-level interval. alpha : float Two-sided significance level the interval was built at. n_clusters, absolute_dof, relative_dof : int | None, float | None, float | None Same contract as :class:SitewideImpact’s fields of the same name - unlike the sum-metric’s absolute_dof, this class’s absolute_dof is always the Satterthwaite reduction, never the plain pairwise dof (see “Degrees of freedom” in the module docstring). window, membership_cutoff, snapshot_id : provenance fields Calendar outcome window, trigger-membership observation cutoff (None for assigned results), and source identity. Native identity reflects declared source snapshot evidence, not table contents; artifact identity is generation-based. scaled_units : int Units the impact scales (n_enrolled, rounded): every observed unit in the control, target and other co-enrolled arms. Members across the complete requested population roster omitted from outcome reduction. Triggered sitewide requires complete calendar coverage, so this is zero for supported triggered requests. multiplicity_status, adjustment : str Sitewide results are exploratory and unadjusted; triggered results do not inherit a registered analysis family. assumptions : tuple[str, …] Assumptions required to interpret the selected population. allocation_balance : AllocationBalance | None Descriptive triggered-population SRM evidence; it never gates a result. allocation_balance_unavailable_reason : str | None Integrity refusal code when triggered balance is unavailable because the design has no declared target allocation.