IMSL C# Numerical Library

NonlinLeastSquares Class

Solves a nonlinear least squares problem using a modified Levenberg-Marquardt algorithm.

For a list of all members of this type, see NonlinLeastSquares Members.

System.Object
   Imsl.Math.NonlinLeastSquares

public class NonlinLeastSquares

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

NonlinLeastSquares is based on the MINPACK routine LMDIF by More et al. (1980). It uses a modified Levenberg-Marquardt method to solve nonlinear least squares problems. The problem is stated as follows:

\mathop {\min }\limits_{x \in R^n }
            \frac{1}{2}F\left( x \right)^T F\left( x \right) = \frac{1}{2}\sum
            \limits_{i = 1}^m {f_i } \left( x \right)^2

where m \ge n, F:\,\,R^n \to R^m, and f_i(x) is the i-th component function of F(x). From a current point, the algorithm uses the trust region approach:

\mathop {\min }\limits_{x_n  \in R^n } \left
            \| {F\left( {x_c } \right) + J\left( {x_c } \right)\left( {x_n  - x_c }
            \right)} \right\|_2

subject to

\left\| {x_n  - x_c } \right\|_2 \le \delta _c

to get a new point x_n, which is computed as

x_n  = x_c  - \left( {J\left( {x_c } \right)^T
            J\left( {x_c } \right) + \mu _c I} \right)^{ - 1} J\left( {x_c } \right)
            ^T F\left( {x_c } \right)

where \mu _c = 0 if \ \delta _c \ge \left
            \|{\left( {J\left( {x_c } \right)^T J\left( {x_c } \right)} \right)^{-1}
            \,\,J\left( {x_c } \right)^T F\left( {x_c } \right)} \right\|_2 and \mu _c > 0 otherwise. F(x_c) and J(x_c) are the function values and the Jacobian evaluated at the current point x_c. This procedure is repeated until the stopping criteria are satisfied. For more details, see Levenberg (1944), Marquardt (1963), or Dennis and Schnabel (1983, Chapter 10).

A finite-difference method is used to estimate the Jacobian when the user supplied function, f, defines the least-squares problem. Whenever the exact Jacobian can be easily provided, f should implement NonlinLeastSquares.Jacobian.

Requirements

Namespace: Imsl.Math

Assembly: ImslCS (in ImslCS.dll)

See Also

NonlinLeastSquares Members | Imsl.Math Namespace | Finite Differences Example | Jacobian Example