Remove dead code from kalman_filter.py
#393
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My original vision for
kalman_filter.py
was quite bad. Followingstatsmodels
, I made a bunch of classes that instantiate various types of kalman filters, with minor differences between them. The idea was to let the user pick what would work best in his given situation.Looking at it now, this should all be accomplished via rewrites. Some of it already is. For example, the only difference between the
StandardFilter
and theSingleTimeSeriesFilter
was that I replaced a matrix inverse with a division. This is done automatically in rewrites, so there's no need for it.I removed the
SteadyStateFilter
because that never made sense. Instead, all of the filters should be checking for convergence to the steady state -- that will be an upcoming PR.CholeskyFilter
has been renamed toSquareRootFilter
, and it actually is a square root filter. I let the user pick it for now, but my plan is to rewrite to this when we see that the user has provided a lower triangularP0
. I haven't benchmarked it, but it should be faster in that case (since solves are replaced with solve_triangular everywhere)