Adds SampleSuccGauss FailureHandler for UKI#118
Merged
Conversation
6af287f to
874ab6b
Compare
874ab6b to
665a155
Compare
Zhengyu-Huang
approved these changes
Mar 3, 2022
Contributor
Zhengyu-Huang
left a comment
There was a problem hiding this comment.
The improvement looks great! Thanks!
odunbar
reviewed
Mar 3, 2022
odunbar
reviewed
Mar 3, 2022
Member
odunbar
left a comment
There was a problem hiding this comment.
Looks good. Two points
- can we guarantee that the
IgnoreFailures()will pass through and produce NaNs rather than cause errors? (which is what is tested here) - can we have some warning flags for >50% fails etc? (as in EKI) - I presume this is still important. It may be worth at some point exporting this out of the individual methods.
Contributor
Author
Thanks! About the points:
|
Contributor
Author
|
bors r+ |
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds the Sample-successful-gaussian Failure Handler for the Unscented Kalman Inversion.
The handler is applied during the analysis step, by computing the ill-defined means and covariances over the successful particles. In order to preserve the sum of the weighting scheme, the weights at each successful sigma point are scaled up.
Consider a set of sigma points {θ_j}={θ_succ_j} U {θ_fail_j}, from which we have to estimate E[G], Cov(G, G) and Cov(G, θ) for the UI update rules. These would generally be computed through the quadrature rules of UKI (possibly modified following Huang et al 2021).
For the mean of the forward model eval we do:
The second option is needed because in the modified unscented transform, W_1 = 1 and all other weights are zero. We do similarly for the mean over parameters θ.
For the covariances we scale up the weights of the off-centered sigma points and compute over the successful particles,
Note that the term Wc_1 * (G(m) -E[ G]) * (G(m) -E[ G]) disappears when using the modified unscented transform because we take E[G]≈G(m). Also, notice that the rescaling is computed over the off-centered sigma points to remain consistent for both Cov(G, θ) and Cov(G, G).