Registry Mirror
Skip to content

Conversation

@galafis

@galafis galafis commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

The standalone rts_smoother indexes Fs[k] and Qs[k] while smoothing state k using state k+1. For matrices supplied to batch_filter, that transition uses Fs[k+1] and Qs[k+1], as already implemented by KalmanFilter.rts_smoother. Constant matrices hide the discrepancy.

Use the next time step in the standalone recursion and clarify the time indexing in its parameter documentation.

Eight regression cases cover varying F only, Q only, both varying, and constant controls, with column and flat state vectors. An independent oracle constructs the joint Gaussian state trajectory and conditions it on all measurements; tests check means, marginal covariance, agreement with the class smoother and preservation of inputs. Six cases fail before the fix, two constant controls pass. After the fix, 20 tests pass across the new file and test_kf.py; two existing tests fail in mahalanobis because NumPy 2.5 rejects conversion of a 2D array to float. The same two failures are reproduced on the unmodified base source.

Fixes #265. Also addresses the varying-parameter discrepancy in #278.

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.

indexing issue in rts_smoother

2 participants