ml-levenberg-marquardt

2.1.1

levenbergMarquardt

src/index.js

Curve fitting algorithm

levenbergMarquardt(data: {x: Array<number>, y: Array<number>}, parameterizedFunction: function, options: object?): {parameterValues: Array<number>, parameterError: number, iterations: number}
Parameters
data ({x: Array<number>, y: Array<number>}) Array of points to fit in the format [x1, x2, ... ] , [y1, y2, ... ]
parameterizedFunction (function) The parameters and returns a function with the independent variable as a parameter
options (object? = {}) Options object
Name Description
options.damping number? Levenberg-Marquardt parameter
options.gradientDifference number (default 10e-2) Adjustment for decrease the damping parameter
options.minValues Array<number>? Minimum allowed values for parameters
options.maxValues Array<number>? Maximum allowed values for parameters
options.initialValues Array<number>? Array of initial parameter values
options.maxIterations number (default 100) Maximum of allowed iterations
options.errorTolerance number (default 10e-3) Minimum uncertainty allowed for each point
Returns
{parameterValues: Array<number>, parameterError: number, iterations: number}: