Skip to content

calib_psms: optional floors on the observation error variance R - #22

Open
nickmckay wants to merge 1 commit into
mainfrom
R-floor
Open

nickmckay wants to merge 1 commit into
mainfrom
R-floor

Conversation

@nickmckay

Copy link
Copy Markdown

Closes #18.

Adds two optional floors on the observation error variance R that calib_psms() assigns from calibration (PSMmse):

  • R_floor: a fixed minimum.
  • R_floor_frac: a minimum relative to each record's own variance. For example, 0.01 caps the signal-to-noise ratio at 10, whatever the record's units.

Where both are set, the larger applies. Both default to 0, so the default behavior is unchanged, and they're stored in job.configs as psm_R_floor and psm_R_floor_frac. With verbose=True, it reports how many records were raised to the floor.

In Presto we use R_floor=0.01 with R_floor_frac=0.01, which raises R for 163 of the Presto2k records.

Tests. Three new tests: a fixed floor, a relative floor, and no floor by default. The full suite passes (220 tests).

Note. This and the expected-sign PR both add an argument to calib_psms(), so whichever is merged second will need a small conflict resolved in the signature and docstring.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TsdL1gpFWoD4LYexEPr6LD

R is set from the calibration residual (PSMmse) with no lower bound, so
a record whose PSM fits almost perfectly gets an R near zero, which can
make the Kalman gain blow up. R_floor sets a fixed minimum and
R_floor_frac a minimum relative to each record's own variance, which
does not depend on the record's units. Both default to 0, so the
default behavior is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TsdL1gpFWoD4LYexEPr6LD
Copilot AI balanced review requested due to automatic review settings October 22, 2026 17:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

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.

No floor on the observation error variance R

2 participants