scipy.optimize.fmin

scipy.optimize.fmin(func, x0, args=(), xtol=0.0001, ftol=0.0001, maxiter=None, maxfun=None, full_output=0, disp=1, retall=0, callback=None)

Minimize a function using the downhill simplex algorithm.

Parameters :

func : callable func(x,*args)

The objective function to be minimized.

x0 : ndarray

Initial guess.

args : tuple

Extra arguments passed to func, i.e. f(x,*args).

callback : callable

Called after each iteration, as callback(xk), where xk is the current parameter vector.

Returns :

xopt : ndarray

Parameter that minimizes function.

fopt : float

Value of function at minimum: fopt = func(xopt).

iter : int

Number of iterations performed.

funcalls : int

Number of function calls made.

warnflag : int

1 : Maximum number of function evaluations made. 2 : Maximum number of iterations reached.

allvecs : list

Solution at each iteration.

Notes

Uses a Nelder-Mead simplex algorithm to find the minimum of a function of one or more variables.

Previous topic

scipy.optimize.check_grad

Next topic

scipy.optimize.fmin_powell

This Page