oseiskar / simdkalman

Python Kalman filters vectorized as Single Instruction, Multiple Data
https://simdkalman.readthedocs.io/
MIT License
177 stars 37 forks source link

Create multiple_systems_update.py #18

Closed microprediction closed 3 years ago

microprediction commented 3 years ago

Example of measurement update with different H, y etc

microprediction commented 3 years ago

Yes thanks, I fixed that. The good news is I think your library works fine with different transition matrices, which I'm guessing you intended. I put another PR in to modify the range check which was the only thing preventing that as far as I can see. I like the patterns here btw. Makes me wonder why all libraries are written this way.

microprediction commented 3 years ago

A notebook can test. I'll add some unit tests.

microprediction commented 3 years ago

As suggested, this PR has only a more minimalist example. However after the range check mods I could shove in something akin to: test_individual_steps

Out of interest, I've hacked around and used the primitives, and code from the primitives here: (See the _update() function) in smdkarmafactory

The smkd ARMA factory stacks Kalman filters and evolves the population based on empirical error.

oseiskar commented 3 years ago

This fix has now been published in version 1.0.2. I also added another example where varying/multiple H matrices are used in a relevant context (and EKF for solving a toy tracking problem): https://github.com/oseiskar/simdkalman/blob/master/examples/primitives_ekf.py