15.12.2012 Views

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.12 Optimization and root finding (<strong>scipy</strong>.optimize)<br />

3.12.1 Optimization<br />

General-purpose<br />

SciPy Reference Guide, Release 0.8.dev<br />

fmin(func, x0[, args, xtol, ftol, maxiter, ...]) Minimize a function using the downhill simplex algorithm.<br />

fmin_powell(func, x0[, args, xtol, ftol, ...]) Minimize a function using modified Powell’s method.<br />

fmin_cg(f, x0[, fprime, args, gtol, norm, ...]) Minimize a function using a nonlinear conjugate gradient<br />

algorithm.<br />

fmin_bfgs(f, x0[, fprime, args, gtol, norm,<br />

...])<br />

Minimize a function using the BFGS algorithm.<br />

fmin_ncg(f, x0, fprime[, fhess_p, fhess, ...]) Minimize a function using the Newton-CG method.<br />

leastsq(func, x0[, args, Dfun, full_output,<br />

...])<br />

Minimize the sum of squares of a set of equations.<br />

fmin(func, x0, args=(), xtol=0.0001, ftol=0.0001, maxiter=None, maxfun=None, full_output=0, disp=1, retall=0,<br />

callback=None)<br />

Minimize a function using the downhill simplex algorithm.<br />

Parameters<br />

func<br />

[callable func(x,*args)] The objective function to be minimized.<br />

x0<br />

[ndarray] Initial guess.<br />

args<br />

[tuple] Extra arguments passed to func, i.e. f(x,*args).<br />

callback<br />

[callable] Called after each iteration, as callback(xk), where xk is the current parameter<br />

vector.<br />

Returns<br />

(xopt, {fopt, iter, funcalls, warnflag})<br />

Other Parameters:<br />

xopt<br />

[ndarray] Parameter that minimizes function.<br />

fopt<br />

[float] Value of function at minimum: fopt = func(xopt).<br />

iter<br />

[int] Number of iterations performed.<br />

funcalls<br />

[int] Number of function calls made.<br />

warnflag<br />

[int] 1 : Maximum number of function evaluations made. 2 : Maximum number of<br />

iterations reached.<br />

allvecs<br />

[list] Solution at each iteration.<br />

3.12. Optimization and root finding (<strong>scipy</strong>.optimize) 297

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!