Skip to content

fix: loglikelihood for time-varying observation covariance - #201

Open
Tusharjamdade wants to merge 1 commit into
pykalman:mainfrom
Tusharjamdade:time-varying
Open

fix: loglikelihood for time-varying observation covariance#201
Tusharjamdade wants to merge 1 commit into
pykalman:mainfrom
Tusharjamdade:time-varying

Conversation

@Tusharjamdade

Copy link
Copy Markdown

Fixes #180

This PR fixes a crash in KalmanFilter.loglikelihood() when a time-varying observation covariance is provided. While the filtering code already supported time-dependent covariances, the loglikelihood computation incorrectly assumed a constant covariance and failed with a shape mismatch.

@Tusharjamdade

Copy link
Copy Markdown
Author

Hi @fkiraly, could you please take a look?

@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.

Looks like a simple improvement, nice!

Though in the test, I think it would be important to also test higher n_dim_obs, could you do that?

Could you also ensure that the code formatting tests are passing?

@fkiraly fkiraly added the bug label Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] loglikelihood error with a time varying observation covariance

2 participants