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

Fix LevenbergMarquardtMinimizer stopping condition #1066

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

diluculo
Copy link
Contributor

addressing issue #1061

Copy link
Member

@jkalias jkalias left a comment

Choose a reason for hiding this comment

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

I would suggest to write a regression test for this bug

@diluculo
Copy link
Contributor Author

diluculo commented Mar 3, 2024

@jkalias, thank you for your prompt response.

While I may not have a concrete test case to demonstrate the issue, it's essential to highlight that the standard Levenberg-Marquardt (LEVM) stopping criterion is ||ΔP|| <= xTol * (||P|| + xTol). Please refer to the stopping criteria as defined on page 26 of Madsen 2004

image

The original buggy code, using P.DotProduct(P), unintentionally produces an early stopping effect. For instance, let's dig into the details of the BoxBod_LM_Der() unit test, specifically examining the section where the condition parameters < upper, scales is applied.

Result P.DotProduct(P) P.L2Norm() Expected
Iteration 16 20
P[0] 213.80940888 213.80940889 213.80940889
P[1] 0.54723748553 0.54723748542 0.54723748542

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants