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

Add Information Filter Tutorial #667

Merged
merged 4 commits into from
Aug 11, 2022
Merged

Add Information Filter Tutorial #667

merged 4 commits into from
Aug 11, 2022

Conversation

jwragg-dstl
Copy link
Contributor

Added Information Filter tutorial. Fixed plotting for information states. Added Gaussian interface to the InformationState.

Previously used state_vector which plotted the InformationState ellipses in the wrong location.
@jwragg-dstl jwragg-dstl requested a review from a team as a code owner June 27, 2022 15:49
@jwragg-dstl jwragg-dstl requested review from sdhiscocks and nperree-dstl and removed request for a team June 27, 2022 15:49
@jwragg-dstl jwragg-dstl force-pushed the informationtutorial branch from 62308c7 to e4a1659 Compare June 27, 2022 16:06
@jwragg-dstl jwragg-dstl requested a review from jmbarr June 27, 2022 16:10
@codecov
Copy link

codecov bot commented Jun 27, 2022

Codecov Report

Merging #667 (261a1cf) into main (de83b4e) will decrease coverage by 0.03%.
The diff coverage is 86.66%.

❗ Current head 261a1cf differs from pull request most recent head 872b08c. Consider uploading reports for the commit 872b08c to get more accurate results

@@            Coverage Diff             @@
##             main     #667      +/-   ##
==========================================
- Coverage   94.55%   94.51%   -0.04%     
==========================================
  Files         168      168              
  Lines        8441     8466      +25     
  Branches     1633     1635       +2     
==========================================
+ Hits         7981     8002      +21     
- Misses        343      345       +2     
- Partials      117      119       +2     
Flag Coverage Δ
integration 69.21% <66.66%> (+0.41%) ⬆️
unittests 92.01% <83.33%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
stonesoup/measures.py 93.20% <66.66%> (-3.64%) ⬇️
stonesoup/plotter.py 93.85% <100.00%> (ø)
stonesoup/types/state.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@nperree-dstl nperree-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 a few tiny documentation things to make it read a bit better but looks pretty good otherwise!

docs/tutorials/12_InformationFilterTutorial.py Outdated Show resolved Hide resolved
docs/tutorials/12_InformationFilterTutorial.py Outdated Show resolved Hide resolved
docs/tutorials/12_InformationFilterTutorial.py Outdated Show resolved Hide resolved
docs/tutorials/12_InformationFilterTutorial.py Outdated Show resolved Hide resolved
docs/tutorials/12_InformationFilterTutorial.py Outdated Show resolved Hide resolved
docs/tutorials/12_InformationFilterTutorial.py Outdated Show resolved Hide resolved
docs/tutorials/12_InformationFilterTutorial.py Outdated Show resolved Hide resolved
docs/tutorials/12_InformationFilterTutorial.py Outdated Show resolved Hide resolved
docs/tutorials/12_InformationFilterTutorial.py Outdated Show resolved Hide resolved
Comment on lines 156 to 158
# Precision matrix - the inverse of the covariance matrix
covar = np.diag([1.5, 0.5, 1.5, 0.5])
precision_matrix = np.linalg.inv(covar) # information matrix
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we labelling this "precision matrix" or "information matrix"? Are they the same thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They're actually the same thing. I'll add 'information matrix (precision matrix)' in place of the above comment to make it more coherent. Thank you.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer precision matrix to avoid confusion with the matrix forms of Shannon and Fisher information (both of which are often referred to as information matrices). Our great sentience (i.e. wikipedia) also reckons it's precision: https://en.wikipedia.org/wiki/Covariance_matrix#Inverse_of_the_covariance_matrix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Jordi. That's great, I'll change it to 'precision matrix'. Can't dispute wikipedia!

@sdhiscocks sdhiscocks force-pushed the informationtutorial branch from 7e23f90 to 1af26b4 Compare August 11, 2022 10:31
@sdhiscocks sdhiscocks merged commit 0c08afe into main Aug 11, 2022
@sdhiscocks sdhiscocks deleted the informationtutorial branch August 11, 2022 10:31
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