Skip to content

fix: autoadaloc 'ensemble' projection in approx_update (#170) - #171

Merged
rolfjl merged 1 commit into
mainfrom
fix/autoadaloc-ensemble-projection
Oct 6, 2026
Merged

rolfjl merged 1 commit into
mainfrom
fix/autoadaloc-ensemble-projection

Conversation

@rolfjl

@rolfjl rolfjl commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #170.

In approx_update, the autoadaloc branch with projection = "ensemble" built the projected anomalies as X2 @ D_anom. That is an (nr, ne) @ (nd, ne) product, so it raises ValueError unless nd == ne. Even when it does run, it counts the innovations twice.

This PR replaces it with (VrT.T * Sr[None, :]) @ X2, which is the V_r Σ_r (I+Σ²)⁻¹ U_rᵀ D transform the non-localized branch already computes as X3. The taper is then (nx, ne), and with an all-ones taper the step equals the non-localized step exactly.

  • Adds a regression test (nd=15, ne=10, cutoff 0, so the taper is all ones). It fails on main with the ValueError from the issue and passes with the fix.
  • Full suite: 593 passed, 2 skipped.
  • CHANGELOG entry under Unreleased → Fixed.

🤖 Generated with Claude Code

The projected anomalies were X2 @ D_anom, an (nr, ne) @ (nd, ne) product
that fails unless nd == ne and counts the innovations twice. Use
V_r S_r X2, so an all-ones taper reproduces the non-localized step.

Fixes #170

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rolfjl
rolfjl merged commit 196c956 into main Oct 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: adaptive localization

1 participant