You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The computation of the log-likelihood, on the kalman update function, is currently made after the state vector is updated with the last observation. That is, the log_likelihood is computed in line 1434 using the updated state of line 1420.
I believe the computation should be made with the prior state estimate; moving the log_likelihood computation just after line 1408 should solve the issue.
@Eheran1 I had trouble with the current implementation while using the log likelihood to fit the parameters of a Dynamic Linear Model (DLM, as in here). I had no luck in fitting the model parameters with the current implementation. However, I was able to fit the model, and the resulting parameters were consistent with my data, with the suggested changes.
The log likelihood is computed using the posterior state estimate in the current implementation, I believe the log likelihood should be computed using the prior state estimate.
The computation of the log-likelihood, on the kalman update function, is currently made after the state vector is updated with the last observation. That is, the log_likelihood is computed in line 1434 using the updated state of line 1420.
I believe the computation should be made with the prior state estimate; moving the log_likelihood computation just after line 1408 should solve the issue.
filterpy/filterpy/kalman/kalman_filter.py
Lines 1329 to 1436 in a437893
The text was updated successfully, but these errors were encountered: