-
Notifications
You must be signed in to change notification settings - Fork 15
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
options.errorTolerance doesn't recognize function minimum #41
Comments
Hello @MontyThibault, Many thanks for it, I will check it soon. |
If the curve can be fit exactly, I've gotten the inverse problem where convergence isn't recognized because the proportion of the change in error to the error itself has a lower bound. A combination of the relative and absolute approaches seems to work well in practice. Not an exact science in any case. converged = (Math.abs(previousError - error) / error <= errorTolerance) || (error <= errorTolerance) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran into a problem and had to make a source modification for the convergence criteria. The currently-implemented convergence criterion operates in absolute terms of the squared residuals. Real data sets with noise may have a minimal curve with an arbitrarily-large error, and convergence in those cases will not be recognized.
https://github.com/mljs/levenberg-marquardt/blob/master/src/index.js#L106
I modified the convergence criteria to be the relative change based on the previous error, as described here: https://en.wikipedia.org/wiki/Non-linear_least_squares#Convergence_criteria.
The text was updated successfully, but these errors were encountered: