and have already been computed by the algorithm, therefore requiring only one additional function evaluation to compute . The choice of the finite difference step can affect the stability of the algorithm, and a value of around 0.1 is usually reasonable in general. Since the acceleration may point in opposite direction to the velocity, to prevent it to stall the method in case the damping is too small, an additional criterion on the acceleration is added in order to accept a step, requiring that where is usually fixed to a value lesser than 1, with smaller values for harder problems. The addition of a geodesic acceleration term can allow significant increase in convergence speed and it is especially useful when the algorithm is moving through narrow canyons in the landscape of the objective function, where the allowed steps are smaller and the higher accuracy due to the second order term gives significative improvements. Example In this example we try to fit the function using the Levenberg–Marquardt algorithm implemented in GNU Octave as the leasqr function. The graphs show progressively better fitting for the parameters , used in the initial curve. Only when the parameters in the last graph are chosen closest to the original, are the curves fitting exactly. This equation is an example of very sensitive initial conditions for the Levenberg–Marquardt algorithm. One reason for this sensitivity is the existence of multiple minima — the function has minima at parameter value and . See also Trust region Nelder–Mead method Variants of the Levenberg–Marquardt algorithm have also been used for solving nonlinear systems of equations. References Further reading External links Detailed description of the algorithm can be found in Numerical Recipes in C, Chapter 15.5: Nonlinear models C. T. Kelley, Iterative Methods for Optimization, SIAM Frontiers in Applied Mathematics, no 18, 1999, . Online copy History of the algorithm in SIAM news A tutorial by Ananth Ranganathan K. Madsen, H. B. Nielsen, O. Tingleff, Methods for Non-Linear Least Squares Problems (nonlinear least-squares tutorial; L-M code: analytic Jacobian secant) T. Strutz: Data Fitting and Uncertainty (A practical introduction to weighted least squares and beyond). 2nd edition, Springer Vieweg, 2016, . H. P. Gavin, The Levenberg-Marquardt method for nonlinear least-squares curve-fitting problems (MATLAB implementation included) Statistical algorithms Optimization algorithms and methods Least squares