{ } Raw JSON

bundles / scipy 1.18.0 / scipy / optimize / _minpack / _lmder

built-in

scipy.optimize._minpack:_lmder

Signature

built-in_lmder(fun, Dfun, x0, args, full_output, col_deriv, ftol, xtol, gtol, maxfev, factor, diag)

Summary

Levenberg-Marquardt algorithm with user-supplied Jacobian.

Extended Summary

Minimizes sum(fun(x)**2) using analytical Jacobian.

Parameters

fun : callable

Residual function. Takes x as first argument, returns array of residuals.

Dfun : callable

Jacobian of fun. Returns matrix of partial derivatives.

x0 : ndarray, shape (n,)

Initial guess, float64.

args : tuple

Extra arguments passed to fun and Dfun.

full_output : int

Non-zero to return optional outputs.

col_deriv : int

Non-zero if Dfun returns column derivatives. Default: 1.

ftol : float

Relative tolerance for residual sum of squares. Default: 1.49012e-8.

xtol : float

Relative tolerance for solution. Default: 1.49012e-8.

gtol : float

Orthogonality tolerance. Default: 0.0.

maxfev : int

Maximum number of function evaluations. Default: 100*(n+1).

factor : float

Initial step bound. Default: 100.0.

diag : ndarray, shape (n,) or None

Scaling factors for variables, float64.

Returns

x : ndarray, shape (n,)

Solution vector.

infodict : dict

Dictionary with keys: fvec (ndarray), nfev (int), njev (int), fjac (ndarray), ipvt (ndarray), qtf (ndarray). Only returned if full_output != 0.

info : int

Exit status. 1-4 indicate success.

Notes

If full_output is 0: returns (x, info) If full_output != 0: returns (x, infodict, info)

Aliases

  • scipy.optimize._minpack._lmder