dstl / Stone-Soup

A software project to provide the target tracking community with a framework for the development and testing of tracking algorithms.
https://stonesoup.rtfd.io
MIT License
385 stars 127 forks source link

Add a Schmidt-Kalman version of the Kalman Updater #794

Closed jmbarr closed 1 year ago

jmbarr commented 1 year ago

A Schmidt-Kalman version of the Kalman Updater. See the docs for how it works. A Gist is provided here: https://gist.github.com/jmbarr/fd76bc5e7e8eeb47122a023287de3e25. Trouble is, it doesn't seem to improve run time much. Which might be testament to how well Python does matrix arithmetic vs matrix assignment or, more likely, because I don't know how to optimise matrix assignment. Suggestions on this part welcome; the place to look is in the posterior_covariance method in the new class.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 95.71% and project coverage change: -0.02 :warning:

Comparison is base (78c88a4) 94.90% compared to head (7c44dc2) 94.89%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #794 +/- ## ========================================== - Coverage 94.90% 94.89% -0.02% ========================================== Files 176 179 +3 Lines 9757 9851 +94 Branches 1938 1955 +17 ========================================== + Hits 9260 9348 +88 - Misses 353 355 +2 - Partials 144 148 +4 ``` | Flag | Coverage Δ | | |---|---|---| | integration | `68.09% <51.42%> (-0.21%)` | :arrow_down: | | unittests | `89.97% <95.71%> (+0.03%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://app.codecov.io/gh/dstl/Stone-Soup/pull/794?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl) | Coverage Δ | | |---|---|---| | [stonesoup/types/state.py](https://app.codecov.io/gh/dstl/Stone-Soup/pull/794?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#diff-c3RvbmVzb3VwL3R5cGVzL3N0YXRlLnB5) | `98.53% <89.09%> (-1.25%)` | :arrow_down: | | [stonesoup/predictor/particle.py](https://app.codecov.io/gh/dstl/Stone-Soup/pull/794?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#diff-c3RvbmVzb3VwL3ByZWRpY3Rvci9wYXJ0aWNsZS5weQ==) | `92.95% <100.00%> (ø)` | | | [stonesoup/regulariser/\_\_init\_\_.py](https://app.codecov.io/gh/dstl/Stone-Soup/pull/794?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#diff-c3RvbmVzb3VwL3JlZ3VsYXJpc2VyL19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | [stonesoup/regulariser/base.py](https://app.codecov.io/gh/dstl/Stone-Soup/pull/794?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#diff-c3RvbmVzb3VwL3JlZ3VsYXJpc2VyL2Jhc2UucHk=) | `100.00% <100.00%> (ø)` | | | [stonesoup/regulariser/particle.py](https://app.codecov.io/gh/dstl/Stone-Soup/pull/794?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#diff-c3RvbmVzb3VwL3JlZ3VsYXJpc2VyL3BhcnRpY2xlLnB5) | `100.00% <100.00%> (ø)` | | | [stonesoup/resampler/particle.py](https://app.codecov.io/gh/dstl/Stone-Soup/pull/794?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#diff-c3RvbmVzb3VwL3Jlc2FtcGxlci9wYXJ0aWNsZS5weQ==) | `100.00% <100.00%> (ø)` | | | [stonesoup/updater/kalman.py](https://app.codecov.io/gh/dstl/Stone-Soup/pull/794?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#diff-c3RvbmVzb3VwL3VwZGF0ZXIva2FsbWFuLnB5) | `96.45% <100.00%> (+0.72%)` | :arrow_up: | | [stonesoup/updater/particle.py](https://app.codecov.io/gh/dstl/Stone-Soup/pull/794?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#diff-c3RvbmVzb3VwL3VwZGF0ZXIvcGFydGljbGUucHk=) | `95.90% <100.00%> (-0.07%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

timothy-glover commented 1 year ago

Here are some cprofile files that may help to optimise this. ek_stats.txt skf_stats.txt