Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of Stochastic Integration Filter #1040

Merged
merged 69 commits into from
Jan 10, 2025
Merged

Conversation

0sm1um
Copy link
Contributor

@0sm1um 0sm1um commented Jun 11, 2024

Hello all, I am presenting an implementation of the Stochastic Integration Filter for review.

The implementation was primarily authored by Jakub Matousek and revised/edited by myself for an upcoming paper for Fusion 2024.

The implementation includes a Predictor, an updator, as well as some functions which perform the stochastic integration scheme itself.

Also as background on the method itself, here are two papers. The first one details the algorithm itself, but the second I feel gives more background on the algorithm itself and contains compairison to other methods.

1.Dunik J, Straka O, Simandl M. Stochastic Integration Filter. IEEE transactions on automatic control. 2013;58(6):1561-1566. doi:10.1109/TAC.2013.2258494
2 .Dunik J, Straka O, Simandl M, Blasch E. Random-point-based filters: analysis and comparison in target tracking. IEEE tr

@0sm1um 0sm1um requested a review from a team as a code owner June 11, 2024 23:00
@0sm1um 0sm1um requested review from mharris-dstl and spike-dstl and removed request for a team June 11, 2024 23:00
Copy link

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.77%. Comparing base (956f1d1) to head (8e1b6d5).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1040      +/-   ##
==========================================
+ Coverage   93.69%   93.77%   +0.07%     
==========================================
  Files         212      212              
  Lines       13881    14048     +167     
  Branches     1922     1931       +9     
==========================================
+ Hits        13006    13173     +167     
  Misses        623      623              
  Partials      252      252              
Flag Coverage Δ
integration 65.56% <19.88%> (-0.61%) ⬇️
unittests 90.98% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@sdhiscocks sdhiscocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the great contribution.

There are some tests missing for smoother and updater. These could be easily added similar to how you've done for predictor.

I wonder if you could make some common code for the multiple recursions, as code is very similar, but minor variations? (You'll see from my suggestions, that many are same for similar code in these recursion parts)

stonesoup/functions/__init__.py Outdated Show resolved Hide resolved
stonesoup/functions/__init__.py Outdated Show resolved Hide resolved
stonesoup/functions/__init__.py Outdated Show resolved Hide resolved
stonesoup/predictor/kalman.py Outdated Show resolved Hide resolved
stonesoup/predictor/kalman.py Outdated Show resolved Hide resolved
stonesoup/updater/kalman.py Outdated Show resolved Hide resolved
stonesoup/updater/kalman.py Outdated Show resolved Hide resolved
stonesoup/updater/kalman.py Outdated Show resolved Hide resolved
stonesoup/updater/kalman.py Outdated Show resolved Hide resolved
stonesoup/functions/__init__.py Outdated Show resolved Hide resolved
0sm1um and others added 11 commits July 26, 2024 23:23
Added unit testing for various SIF related modules.
Changed line in SIF Updater to use matrix broadcasting.

Co-authored-by: Steven Hiscocks <[email protected]>
Simplified check on SIF updater and added in place operation for speed.

Co-authored-by: Steven Hiscocks <[email protected]>
Used matrix broadcasting in SIF Updater in place of depriciated np.matrix operation.

Co-authored-by: Steven Hiscocks <[email protected]>
Converted SIF Updater to inplace operations for speed.

Co-authored-by: Steven Hiscocks <[email protected]>
Removed unneccisary parenthesis from SIF Updater

Co-authored-by: Steven Hiscocks <[email protected]>
Copy link
Contributor

@hpritchett-dstl hpritchett-dstl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some final documentation points and naming conventions, after this it looks good to merge (to me at least!)

Thanks :)
Henry

stonesoup/functions/__init__.py Outdated Show resolved Hide resolved
stonesoup/functions/__init__.py Outdated Show resolved Hide resolved
stonesoup/functions/__init__.py Outdated Show resolved Hide resolved
stonesoup/functions/__init__.py Outdated Show resolved Hide resolved
stonesoup/predictor/kalman.py Outdated Show resolved Hide resolved
stonesoup/smoother/kalman.py Show resolved Hide resolved
stonesoup/updater/kalman.py Outdated Show resolved Hide resolved
0sm1um and others added 15 commits November 13, 2024 10:42
Revised SIF updater docstring

Co-authored-by: Henry Pritchett <[email protected]>
fixed typo in SIF predictor docstring

Co-authored-by: Henry Pritchett <[email protected]>
Fixed typo on line 1067 of SIF built in function

Co-authored-by: Henry Pritchett <[email protected]>
Fixed typo on line 972 of SIF built in function

Co-authored-by: Henry Pritchett <[email protected]>
Corrected import statment in kalman smoother file pertaining to SIF
Corrected import statment in kalman predictor file pertaining to SIF
Corrected import statment in kalman updater file pertaining to SIF
Fixed incorrect function name in SIF Smoother
Fixed incorrect function name in SIF predictor
Fixed incorrect function name in SIF Updater
@0sm1um
Copy link
Contributor Author

0sm1um commented Jan 9, 2025

Just some final documentation points and naming conventions, after this it looks good to merge (to me at least!)

Thanks :) Henry

Could you take a look at the latest changes? I believe it should be ready to go!

Copy link
Contributor

@hpritchett-dstl hpritchett-dstl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work! Happy to approve this :)

Thanks,
Henry

@sdhiscocks sdhiscocks merged commit 6e99395 into dstl:main Jan 10, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants