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

Incorrect condition for stopping the LevenbergMarquardtMinimizer's Minimum() by parameter tolerance. #1061

Open
anotherche opened this issue Feb 4, 2024 · 1 comment

Comments

@anotherche
Copy link

if (Pstep.L2Norm() <= stepTolerance * (stepTolerance + P.DotProduct(P)))

Why is the vector length (Pstep.L2Norm()) compared to the square of the vector length (P.DotProduct(P))? Looks like a bug. Of course, if the parameters were scaled correctly (|Pi|~1) this does not cause a problem. But in general, this is not correct. Wouldn't it be more correct to compare Pstep.L2Norm() to P.L2Norm(), or their squares?

@diluculo
Copy link
Contributor

You are correct, It's a bug.
LINE 160: // if ||ΔP|| <= xTol * (||P|| + xTol), found and stop

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

No branches or pull requests

2 participants