Click or drag to resize

LevenbergMarquardt2D Properties

The LevenbergMarquardt2D type exposes the following members.

Properties
  NameDescription
Public propertyJacobian
Function to calculate Jacobian of input function.
Public propertyJacobianRecalc
Integer specifying how often the Jacobian is completely recalculated by a forward difference approximation.

Every iteration can either performs a rank-1 update of the the Jacobian or completely recalculate the Jacobian. This number specifies how often the Jacobian should be completely recalculated.

Set to 1 to recalculate in every iteration. Set to zero to never recalculate, but only use rank-1 updates.

Default is 10. When a Jacobian function is provided, this parameter is not used.

Public propertyLambdaScaling
Scaling factor in J'*J+lambda*I, replacing the diagonal of I by those in LambdaScaling

By default they are [1,1]. They can not be negative.

Public propertyMaxFunctionEval
Maximum number of function evaluations. Default 200

This may not be hit exactly, since one iteration can trigger several function evaluations.

In case a Jacobian is not provided, this can be set app.

MaxIter + 2*MaxIter/JacobianRecalc,
since the number of evaluations per iteration is 1 per default and then 2 evaluations per 1/JacobianRecalc iterations

Public propertyMaxIter
Maximum number of iterations. Default 100
Public propertyMaxLineSearchIter
Maximum number of line search iterations. Default 0.
Public propertyNumFunctionEval
Hold the number of function evaluations for the last solve.
Public propertyNumIter
Hold the actual number of iterations for the last solve.
Public propertyNumJacobianEval
Hold the number of Jacobian evaluations for the last solve.
Public propertyRelativeDx
Relative dx used when calculating Jacobian numerically by a forward difference approximation.

Default value is 1e-6;

The forward difference has the form:

dx = RelativeDx*Math.Abs(x)
df/dx = (f(x+dx)-f(x)) / dx;

Public propertyTau
used in starting value for Marquardt parameter:
lambda = Tau * max( diag(J(x0)'*J(x0)) )

Default value is 1e-3

Public propertyTolG
Tolerance value for steepest descent direction, used in stopping criteria, stopping when:
||g||_inf <= TolG

Default value is 1e-6. It is recommended to set a lower value when not using LM (UseLm).

Public propertyTolX
Tolerance value for change in parameter vector, used in stopping criteria, stopping when:
||dx||_2 <= TolX*(||x||_2 + TolX)
It combines a relative and absolute stopping criteria

Default value is 1e-9.

Public propertyUseLineSearch
Flag specifying whether a line search approach is to be used. Default false.
Public propertyUseLm
Flag whether a LM algorithm should be used. Default true. If set to false the Newton-Raphson method will be used. The Newton-Raphson method can only be used for finding zeros, not for minimizing.
Top
See Also