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.

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

See Also:<br />

disp<br />

[bool] Print convergence message if True.<br />

retall<br />

[bool] Return a list of results at each iteration if True.<br />

Notes<br />

Optimize the function, f, whose gradient is given by fprime using the quasi-Newton method<br />

of Broyden, Fletcher, Goldfarb, and Shanno (BFGS) See Wright, and Nocedal ‘Numerical<br />

Optimization’, 1999, pg. 198.<br />

OpenOpt<br />

[a tool which offers a unified syntax to call] this and other solvers with possibility of automatic<br />

differentiation.<br />

fmin_ncg(f, x0, fprime, fhess_p=None, fhess=None, args=(), avextol=1.0000000000000001e-05,<br />

epsilon=1.4901161193847656e-08, maxiter=None, full_output=0, disp=1, retall=0, callback=None)<br />

Minimize a function using the Newton-CG method.<br />

Parameters<br />

f<br />

x0<br />

[callable f(x,*args)] Objective function to be minimized.<br />

[ndarray] Initial guess.<br />

fprime<br />

[callable f’(x,*args)] Gradient of f.<br />

fhess_p<br />

[callable fhess_p(x,p,*args)] Function which computes the Hessian of f times an arbitrary<br />

vector, p.<br />

fhess<br />

[callable fhess(x,*args)] Function to compute the Hessian matrix of f.<br />

args<br />

[tuple] Extra arguments passed to f, fprime, fhess_p, and fhess (the same set of extra<br />

arguments is supplied to all of these functions).<br />

epsilon<br />

[float or ndarray] If fhess is approximated, use this value for the step size.<br />

callback<br />

[callable] An optional user-supplied function which is called after each iteration. Called<br />

as callback(xk), where xk is the current parameter vector.<br />

Returns<br />

(xopt, {fopt, fcalls, gcalls, hcalls, warnflag},{allvecs})<br />

xopt<br />

[ndarray] Parameters which minimizer f, i.e. f(xopt) == fopt.<br />

fopt<br />

[float] Value of the function at xopt, i.e. fopt = f(xopt).<br />

fcalls<br />

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

302 Chapter 3. Reference

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

Saved successfully!

Ooh no, something went wrong!