## File: Nonlinear-Least_002dSquares-Testing-for-Convergence.html

package info (click to toggle)
gsl-ref-html 2.3-1
• area: non-free
• in suites: bullseye, buster, sid
• size: 6,876 kB
• ctags: 4,574
• sloc: makefile: 35
 file content (147 lines) | stat: -rw-r--r-- 7,854 bytes parent folder | download
 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147  GNU Scientific Library – Reference Manual: Nonlinear Least-Squares Testing for Convergence

39.8 Testing for Convergence

A minimization procedure should stop when one of the following conditions is true:

• A minimum has been found to within the user-specified precision.
• A user-specified maximum number of iterations has been reached.
• An error has occurred.

The handling of these conditions is under user control. The functions below allow the user to test the current estimate of the best-fit parameters in several standard ways.

Function: int gsl_multifit_nlinear_test (const double xtol, const double gtol, const double ftol, int * info, const gsl_multifit_nlinear_workspace * w)
Function: int gsl_multilarge_nlinear_test (const double xtol, const double gtol, const double ftol, int * info, const gsl_multilarge_nlinear_workspace * w)

These functions test for convergence of the minimization method using the following criteria:

• Testing for a small step size relative to the current parameter vector
|\delta_i| <= xtol (|x_i| + xtol)

for each 0 <= i < p. Each element of the step vector \delta is tested individually in case the different parameters have widely different scales. Adding xtol to |x_i| helps the test avoid breaking down in situations where the true solution value x_i = 0. If this test succeeds, info is set to 1 and the function returns GSL_SUCCESS.

A general guideline for selecting the step tolerance is to choose xtol = 10^{-d} where d is the number of accurate decimal digits desired in the solution x. See Dennis and Schnabel for more information.

• Testing for a small gradient (g = \nabla \Phi(x) = J^T f) indicating a local function minimum:
||g||_inf <= gtol

This expression tests whether the ratio (\nabla \Phi)_i x_i / \Phi is small. Testing this scaled gradient is a better than \nabla \Phi alone since it is a dimensionless quantity and so independent of the scale of the problem. The max arguments help ensure the test doesn’t break down in regions where x_i or \Phi(x) are close to 0. If this test succeeds, info is set to 2 and the function returns GSL_SUCCESS.

A general guideline for choosing the gradient tolerance is to set gtol = GSL_DBL_EPSILON^(1/3). See Dennis and Schnabel for more information.

If none of the tests succeed, info is set to 0 and the function returns GSL_CONTINUE, indicating further iterations are required.