fix(#125): fail closed on degenerate BCa intervals - #143
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Exact-head verification is complete on |
Status 2026-09-07 — matrix-tested at head; deepest base in the stackThe 13 runs come from the now-closed exact-head verification PR #144, which carried this SHA against This PR sits two levels deep: No issue band added: the base is not What Marco has to decideNothing to fix on this branch itself. It moves only after #121 lands and #134 is rebased onto it — and the rebase will invalidate Read-only measurement. No push, no merge, no rebase, no re-run, nothing resolved. |
c7673e0
into
chatgpt/issue-124-residual-scaling
Problem
A noise-free / numerically degenerate parametric bootstrap can return an exactly zero-width BCa interval. The arithmetic is internally consistent but the public meaning is unsafe: the resampling model has no measurable spread, so
(x, x)reads as perfect uncertainty resolution rather thanuncertainty unavailable.Fix
bca_cinow treats degeneracy per parameter, not per fit:(NaN, NaN)for that parameter with aRuntimeWarning;No arbitrary noise floor or scale threshold is introduced.
Controls
New regressions cover:
External validation
SciPy's current
scipy.stats.bootstrap(method='BCa')documentsDegenerateDataWarningand notes that BCa confidence-interval elements may be NaN when the bootstrap distribution is degenerate. This PR adopts the same fail-closed interpretation rather than inventing a finite uncertainty floor.Stacked on #134 because that branch contains the preceding GLS amplitude-scale fix; this PR changes only bootstrap uncertainty semantics.