Repository navigation
changed: hessian=true by default for MovingHorizonEstimator - #537
Merged
Merged
Conversation
The default values work well, with the new breaking change.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #537 +/- ##
=======================================
Coverage 99.06% 99.06%
=======================================
Files 30 30
Lines 8446 8446
=======================================
Hits 8367 8367
Misses 79 79 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
Okay CI is drastically slower because of this breaking change. I will add some |
The goal is to accelerate CI. In almost all the cases the model are in face linear under-the-hood, thus the Hessians are all 0. This is a waste to always compute them with sparse `ForwardDiff.jl`, mainly for the preparation step.
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.
Warning
This is a breaking change, the (exact) Hessian of the Lagrangian is now computed by default for
MovingHorizonEstimator, instead of relying on the internal quasi-newton method of the optimizer.In most of my tests (variations on the pendulum and variations on the pH reactor), the quasi-newton method of
Ipopt/Uno/MadNLPnever converged for theMovingHorizonEstimator. An exact Hessian was always needed. I am now confident thathessian=trueis a better default for the MHE. Otherwise, It can be easily reverted by specifyinghessian=false.On reason for this is the arrival estimation covariance$\mathbf{\bar{P}}$ , when it's approximated by an UKF or EKF. The inverse of this (dense) matrix will appear in the Hessian of the objective function, making it more difficult to replicate with a quasi-Newton approximation like L-BFGS.