nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Data.Bootstrapping.Fittings / LmSolver

LmSolver

Full name Microsoft.VisualBasic.Data.Bootstrapping.LevenbergMarquardt.LmSolver Assembly Microsoft.VisualBasic.Data.Bootstrapping.Fittings Members 9

levenberg-marquardt

A lightweight implementation of Levenberg-Marquardt algorithm

Augmented normal equation

 (H + uI) * h = -g

where:

  • H is the Hessian matrix of the chi-squared error function
  • g is the gradient (Jacobian) vector of the chi-squared error function
  • u is the damping value

Adjusting damping value

Damping value is adjusted at each iteration. The adjustment follows the algorithm presented in Methods for non-linear least squares problems by Kaj Madsen, Hans Bruun Nielsen, Ole Tingleff. The lecture note can be downloaded here.

00 Remarks

https://github.com/truongduy134/levenberg-marquardt

01 Syntax

Microsoft.VisualBasic.Data.Bootstrapping.LevenbergMarquardt.LmSolver

02 Methods

NameOverloadsSummary
solve 4 Applies Levenberg-Marquadt algorithm on the input error function with the input initial guess of optimization parameters

03 Properties

04 Members

method solve #
solve(Double(), LmParamHandler, Boolean)

Applies Levenberg-Marquadt algorithm on the input error function with the input initial guess of optimization parameters

Parameters
NameTypeDescription
optParamsDouble()

A vector of initial guess of values of parameters for optimization

paramHandlerLmParamHandler

A handler which is called to adjust values of the Levenberg-Marquadt parameters after they are updated at the end of each iteration in the algorithm. If {@code paramHandler} is null, no further adjustment to the updated parameters is performed. This is useful when Levenberg-Marquadt algorithm is performed on structures such as quaternions. Note that the way updated parameters are modified can affect correctness of the Levenberg-Marquadt algorithm

approxHessianFlgBoolean

A boolean flag to indicate whether the Hessian matrix used in the Levenberg-Marquadt algorithm should be approximated or computed exactly. If {@code true}, the Hessian matrix will be approximated by the Jacobian matrix

method solve overload 4 #
solve(Double())

Applies Levenberg-Marquadt algorithm on the input error function with the input initial guess of optimization parameters. Note that the Hessian matrix used in the Levenberg-Marquadt will be computed exactly

Parameters
NameTypeDescription
optParamsDouble()

A vector of initial guess of values of parameters for optimization

method solve overload 3 #
solve(Double(), Boolean)

Applies Levenberg-Marquadt algorithm on the input error function with the input initial guess of optimization parameters.

Parameters
NameTypeDescription
optParamsDouble()

A vector of initial guess of values of parameters for optimization

approxHessianFlgBoolean

A boolean flag to indicate whether the Hessian matrix used in the Levenberg-Marquadt algorithm should be approximated or computed exactly. If {@code true}, the Hessian matrix will be approximated by the Jacobian matrix

method solve overload 2 #
solve(Double(), LmParamHandler)

Applies Levenberg-Marquadt algorithm on the input error function with the input initial guess of optimization parameters. Note that the Hessian matrix used in the Levenberg-Marquadt will be computed exactly

Parameters
NameTypeDescription
optParamsDouble()

A vector of initial guess of values of parameters for optimization

paramHandlerLmParamHandler

A handler which is called to adjust values of the Levenberg-Marquadt parameters after they are updated at the end of each iteration in the algorithm. If {@code paramHandler} is null, no further adjustment to the updated parameters is performed. This is useful when Levenberg-Marquadt algorithm is performed on structures such as quaternions. Note that the way updated parameters are modified can affect correctness of the Levenberg-Marquadt algorithm

property DampingFactor #
DampingFactor
property MaxNumIter #
MaxNumIter
property ErrorFunc #
ErrorFunc
property GradientEpsilon #
GradientEpsilon
property ChangeEpsilon #
ChangeEpsilon