minimize

SeparableModelResult.minimize(method='leastsq', params=None, **kws)

Perform the minimization.

Parameters:
  • method (str, optional) –

    Name of the fitting method to use. Valid values are:

    • ’leastsq’: Levenberg-Marquardt (default)
    • ’least_squares’: Least-Squares minimization, using Trust Region Reflective method
    • ’differential_evolution’: differential evolution
    • ’brute’: brute force method
    • ’basinhopping’: basinhopping
    • ’ampgo’: Adaptive Memory Programming for Global Optimization
    • nelder’: Nelder-Mead
    • ’lbfgsb’: L-BFGS-B
    • ’powell’: Powell
    • ’cg’: Conjugate-Gradient
    • ’newton’: Newton-CG
    • ’cobyla’: Cobyla
    • ’bfgs’: BFGS
    • ’tnc’: Truncated Newton
    • ’trust-ncg’: Newton-CG trust-region
    • ’trust-exact’: nearly exact trust-region (SciPy >= 1.0)
    • ’trust-krylov’: Newton GLTR trust-region (SciPy >= 1.0)
    • ’trust-constr’: trust-region for constrained optimization (SciPy >= 1.1)
    • ’dogleg’: Dog-leg trust-region
    • ’slsqp’: Sequential Linear Squares Programming
    • ’emcee’: Maximum likelihood via Monte-Carlo Markov Chain

    In most cases, these methods wrap and use the method with the same name from scipy.optimize, or use scipy.optimize.minimize with the same method argument. Thus ‘leastsq’ will use scipy.optimize.leastsq, while ‘powell’ will use scipy.optimize.minimizer(…, method=’powell’)

    For more details on the fitting methods please refer to the SciPy docs.

  • params (Parameters, optional) – Parameters of the model to use as starting values.
  • **kws (optional) – Additional arguments are passed to the underlying minimization method.
Returns:

Object containing the optimized parameter and several goodness-of-fit statistics.

Return type:

MinimizerResult

Changed in version 0.9.0: Return value changed to MinimizerResult.