scipy.optimize.fminbound

scipy.optimize.fminbound(func, x1, x2, args=(), xtol=1.0000000000000001e-05, maxfun=500, full_output=0, disp=1)

Bounded minimization for scalar functions.

Parameters:
func : callable f(x,*args)

Objective function to be minimized (must accept and return scalars).

x1, x2 : float or array scalar

The optimization bounds.

args : tuple

Extra arguments passed to function.

xtol : float

The convergence tolerance.

maxfun : int

Maximum number of function evaluations allowed.

full_output : bool

If True, return optional outputs.

disp : int
If non-zero, print messages.

0 : no message printing. 1 : non-convergence notification messages only. 2 : print a message on convergence too. 3 : print iteration results.

Returns:

(xopt, {fval, ierr, numfunc})

xopt : ndarray

Parameters (over given interval) which minimize the objective function.

fval : number

The function value at the minimum point.

ierr : int

An error flag (0 if converged, 1 if maximum number of function calls reached).

numfunc : int

The number of function calls made.

Notes:

Finds a local minimizer of the scalar function func in the interval x1 < xopt < x2 using Brent’s method. (See brent for auto-bracketing).

Previous topic

scipy.optimize.brute

Next topic

scipy.optimize.golden

This Page

Quick search