curve_fit

Function curve_fit 

Source
pub fn curve_fit<N: ComplexField, V: DimName, F: FnMut(N, &VectorN<N, V>) -> N>(
    f: F,
    xs: &[N],
    ys: &[N],
    initial: &[N],
    params: &CurveFitParams<N>,
) -> Result<VectorN<N, V>, String>
Expand description

Fit a curve using the Levenberg-Marquardt algorithm.

Uses finite differences of h to calculate the jacobian. If jacobian can be found analytically, then use curve_fit_jac. Keeps iterating until the differences between the sum of the square residuals of two iterations is under tol.