Skip to content

[BUG] Use Joseph form for numerically stable covariance update#212

Open
WHOIM1205 wants to merge 1 commit into
pykalman:mainfrom
WHOIM1205:fix/joseph-form-covariance
Open

[BUG] Use Joseph form for numerically stable covariance update#212
WHOIM1205 wants to merge 1 commit into
pykalman:mainfrom
WHOIM1205:fix/joseph-form-covariance

Conversation

@WHOIM1205

Copy link
Copy Markdown

Fix: Stabilize Covariance Update in _filter_correct Using Joseph Form

Summary

This PR replaces the numerically unstable covariance update in
pykalman/standard.py::_filter_correct with the Joseph stabilized form.

The previous implementation used:

corrected_state_covariance = predicted_state_covariance - np.dot(
    kalman_gain, np.dot(observation_matrix, predicted_state_covariance)
)

Signed-off-by: WHOIM1205 <rathourprateek8@gmail.com>

@fkiraly fkiraly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you explain or give a reference why this is preferred in terms of numerical stability? How does this impact speed?

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.

2 participants