Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

name: op-reg-mod-resample
description: Spec-level resampling modifier (jackknife / bootstrap) that composes with an OLS or GLM fit; replaces analytical std errors with empirical estimates. Non-empty value forces the buffered path.
kind: operator
category: REG
operator: REG_RESAMPLE
type: reference
applies_to: process, compose, predict
examples_tags: [regression, resampling, jackknife, buffered-pipeline]

Regression operators emit coefficient + diagnostics; no Response.Components. This modifier overwrites StdErrors / PValues in Response.Regressions[i]; the point estimate stays the full-data fit.

Params

Top-level resample on RegressionSpec plus two bootstrap knobs. A wrapper, not a fit: the host fit runs once per replicate (jackknife = n refits; bootstrap = bootstrap_iters) and β samples are aggregated.

NameTypeDefaultDescription
resampleenum"""", jackknife (leave-one-out), bootstrap (non-parametric).
bootstrap_itersint1000Replicate count; read only when resample == "bootstrap".
rng_seedint00 derives a deterministic per-request seed; non-zero is reproducible.

Inputs

Inherits target / predictors from the host RegressionSpec. No additional field inputs.

HostAccepted?
REG_OLS (any penalty)yes
REG_GLMyes
REG_BAYES_LINEARrejected — credible intervals already convey uncertainty

Output

  • StdErrors[name] — jackknife √((n−1)/n · Σ(β⁽⁻ⁱ⁾ − β̄)²); bootstrap sample std of replicates.
  • PValues[name] — jackknife pivotal; bootstrap percentile-method two-sided.
  • Resample echoes back; Coefficients unchanged. For l1 / elasticnet OLS, bootstrap suppresses PROCESSING_REGRESSION_APPROXIMATE_SE.

Gotchas

  • Any non-empty resample forces buffered — RegressionSpec.Streamable() → false. Predict reports the downgrade.
  • Jackknife is O(n) refits; on large cohorts prefer bootstrap with moderate replicates.
  • Composes with selection — the resample wraps the selected-feature fit.
  • rng_seed = 0 is deterministic per request but cohort-dependent; pin non-zero for cross-cohort reproducibility.
  • Never weighted: any row weight in force on the regression (slot, request or Options.DefaultWeight) is PULSE_WEIGHT_UNSUPPORTED with details.reason; "weight": null on the slot runs it unweighted.

See