-
Notifications
You must be signed in to change notification settings - Fork 57
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
Refactor UKF Components to use linearize() #635
Refactor UKF Components to use linearize() #635
Conversation
compute_jacobian_at = ( | ||
_linearise_at | ||
if _linearise_at is not None | ||
else randvars.Constant(realization) | ||
) | ||
linearized_model = self.linearize(t=t, at_this_rv=compute_jacobian_at) | ||
return linearized_model.forward_realization( | ||
realization=realization, | ||
t=t, | ||
dt=dt, | ||
compute_gain=compute_gain, | ||
_diffusion=_diffusion, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very soon, this whole class can go, and the linearization is done from the outside in, e.g., an ExtendedKalman()
object.
Codecov Report
@@ Coverage Diff @@
## main #635 +/- ##
=======================================
Coverage 89.83% 89.84%
=======================================
Files 186 186
Lines 7063 7020 -43
Branches 1109 1104 -5
=======================================
- Hits 6345 6307 -38
+ Misses 472 468 -4
+ Partials 246 245 -1
|
@@ -1,264 +0,0 @@ | |||
"""Unscented Transform.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the unscented transform can finally go
tests/test_filtsmooth/test_gaussian/test_approx/_linearization_test_interface.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments, but can be merged from my side.
Thanks for the fine-granular PR ✨
…ssian/approx/_interface.py
In a Nutshell
With this PR, forward and backward propagation in UKFComponents is handled via explicit linearisation.
Detailed Description
Instead of implementing forward* and backward*, the UKF now only uses a linearise() method, which handles the forward and backward propagation.
This makes a bunch of code obsolete, and simplifies further refactoring steps mentioned in #627.