LevenbergMarquardt class

The Levenberg–Marquardt algorithm, also known as the damped least-squares method, is used to solve non-linear least squares problems.

See https://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm.

Inheritance

Constructors

LevenbergMarquardt(ParametrizedUnaryFunction<double> parametrizedFunction, {double? initialValue, dynamic initialValues, double? minValue, dynamic minValues, double? maxValue, dynamic maxValues, double gradientDifference = 1e-1, dynamic gradientDifferences, double damping = 1e-2, double dampingStepDown = 9.0, double dampingStepUp = 11.0, bool centralDifference = false, double improvementThreshold = 1e-3, double errorTolerance = 1e-7, int maxIterations = 100})

Properties

centralDifference bool
If true the Jacobian matrix is approximated by central differences otherwise by forward differences.
final
damping double
Small values of the damping factor result in a Gauss-Newton update and large values in a gradient descent update.
final
dampingStepDown double
Factor to reduce the damping when there is not an improvement when updating parameters.
final
dampingStepUp double
Factor to increase the damping when there is an improvement when updating parameters.
final
errorTolerance double
Minimum uncertainty allowed for each point.
final
gradientDifferences Vector<double>
The step size to approximate each parameter in the Jacobian matrix.
final
hashCode int
The hash code for this object.
no setterinherited
improvementThreshold double
The threshold to define an improvement through an update of parameters.
final
initialValues Vector<double>
A vector of initial parameter values.
final
maxIterations int
Maximum of allowed iterations
final
maxValues Vector<double>
Maximum allowed values for parameters.
final
minValues Vector<double>
Minimum allowed values for parameters.
final
parametrizedFunction ParametrizedUnaryFunction<double>
A parametrized function
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fit({required Vector<double> xs, required Vector<double> ys, double weight = 1.0, Vector<double>? weights}) LevenbergMarquardtResult
Fits a list of data points to the configured model.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited