Skip to content

Fix hybrid decoder: remove det-ratio floor that killed high-dim models#67

Merged
iahncajigas merged 1 commit intomainfrom
fix/hybrid-decoder-det-ratio
Mar 18, 2026
Merged

Fix hybrid decoder: remove det-ratio floor that killed high-dim models#67
iahncajigas merged 1 commit intomainfrom
fix/hybrid-decoder-det-ratio

Conversation

@iahncajigas
Copy link
Copy Markdown
Contributor

Summary

  • The Laplace approximation likelihood in PPHybridFilterLinear (and PPHybridFilter) used max(sqrt(det(W_p)), 1e-15) as a denominator floor
  • For 6D state models, sqrt(det(W_p)) ≈ 1e-23, far below the 1e-15 floor — artificially deflating the reach model's likelihood by ~8 orders of magnitude
  • The hybrid filter was permanently locked in hold-state (mode 1), never detecting reach movements
  • Fix: compute sqrt(det(W_u) / det(W_p)) directly, which cancels absolute scale and matches MATLAB exactly

Test plan

  • Single-sim hybrid decoder now switches between both modes (S_est contains both 1 and 2)
  • 20-sim run: state accuracy 67%, mode probabilities 54%/46% (was 47%, 100%/0%)
  • 210 existing tests pass (5 skipped), 12 decoder tests pass
  • CI: unit-lint, notebook-parity-core, regenerate-figures

🤖 Generated with Claude Code

…m models

The determinant ratio sqrt(det(W_u))/sqrt(det(W_p)) in the Laplace
approximation used max(..., 1e-15) as a denominator floor.  For 6D
state models the absolute determinant (~1e-46) falls far below this
floor, artificially deflating the likelihood by ~8 orders of magnitude
and preventing the filter from ever selecting the reach model.

Compute the ratio as sqrt(det(W_u)/det(W_p)) instead, which cancels
the absolute scale and matches MATLAB behavior exactly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@iahncajigas iahncajigas merged commit 6f395d2 into main Mar 18, 2026
14 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.

1 participant