Click or drag to resize
NonlinLeastSquares Class
Solves a nonlinear least squares problem using a modified Levenberg-Marquardt algorithm.
Inheritance Hierarchy
SystemObject
  Imsl.MathNonlinLeastSquares

Namespace: Imsl.Math
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
[SerializableAttribute]
public class NonlinLeastSquares

The NonlinLeastSquares type exposes the following members.

Constructors
  NameDescription
Public methodNonlinLeastSquares
Creates an object to solve a nonlinear least squares problem.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetFscale
Sets the diagonal scaling matrix for the functions.
Public methodSetGuess
Sets the initial guess of the minimum point of the input function.
Public methodSetXscale
Set the diagonal scaling matrix for the variables.
Public methodSolve
Solve a nonlinear least-squares problem using a modified Levenberg-Marquardt algorithm and a Jacobian.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyAbsoluteTolerance
The absolute function tolerance.
Public propertyDigits
The number of good digits in the function.
Public propertyErrorStatus
Get information about the performance of NonlinLeastSquares.
Public propertyFalseConvergenceTolerance
The false convergence tolerance.
Public propertyGradientTolerance
The scaled gradient tolerance.
Public propertyInitialTrustRegion
The initial trust region radius.
Public propertyMaximumIterations
The maximum number of iterations allowed.
Public propertyMaximumStepsize
The maximum allowable stepsize to use.
Public propertyNumberOfProcessors
Perform the parallel calculations with the maximum possible number of processors set to NumberOfProcessors.
Public propertyParallel
Enable or disable performing NonlinLeastSquares.IFunction.F in parallel.
Public propertyRelativeTolerance
The relative function tolerance.
Public propertyStepTolerance
The scaled step tolerance.
Top
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. The first stopping criteria occurs when the norm of the function is less than the property AbsoluteTolerance. The second stopping criteria occurs when the norm of the scaled gradient is less than the property GradientTolerance. The third stopping criteria occurs when the scaled distance between the last two steps is less than the property StepTolerance. 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.

See Also