Curve fitting algorithm
(function)
Takes an array of parameters and returns a function with the independent variable as its sole argument
(object)
Options object
Name | Description |
---|---|
options.initialValues ArrayLike<number>
|
Array of initial parameter values |
options.weights (number | ArrayLike<number>)
(default 1 )
|
weighting vector, if the length does not match with the number of data points, the vector is reconstructed with first value. |
options.damping number
(default 1e-2 )
|
Levenberg-Marquardt parameter, small values of the damping parameter λ result in a Gauss-Newton update and large values of λ result in a gradient descent update |
options.dampingStepDown number
(default 9 )
|
factor to reduce the damping (Levenberg-Marquardt parameter) when there is not an improvement when updating parameters. |
options.dampingStepUp number
(default 11 )
|
factor to increase the damping (Levenberg-Marquardt parameter) when there is an improvement when updating parameters. |
options.improvementThreshold number
(default 1e-3 )
|
the threshold to define an improvement through an update of parameters |
options.gradientDifference (number | ArrayLike<number>)
(default 10e-2 )
|
The step size to approximate the jacobian matrix |
options.centralDifference boolean
(default false )
|
If true the jacobian matrix is approximated by central differences otherwise by forward differences |
options.minValues ArrayLike<number>?
|
Minimum allowed values for parameters |
options.maxValues ArrayLike<number>?
|
Maximum allowed values for parameters |
options.maxIterations number
(default 100 )
|
Maximum of allowed iterations |
options.errorTolerance number
(default 10e-3 )
|
Minimum uncertainty allowed for each point. |
options.timeout number?
|
maximum time running before throw in seconds. |
{parameterValues: Array<number>, parameterError: number, iterations: number}
: