SciPy

scipy.optimize.bracket

scipy.optimize.bracket(func, xa=0.0, xb=1.0, args=(), grow_limit=110.0, maxiter=1000)[source]

Bracket the minimum of the function.

Given a function and distinct initial points, search in the downhill direction (as defined by the initital points) and return new points xa, xb, xc that bracket the minimum of the function f(xa) > f(xb) < f(xc). It doesn’t always mean that obtained solution will satisfy xa<=x<=xb

Parameters
funccallable f(x,*args)

Objective function to minimize.

xa, xbfloat, optional

Bracketing interval. Defaults xa to 0.0, and xb to 1.0.

argstuple, optional

Additional arguments (if present), passed to func.

grow_limitfloat, optional

Maximum grow limit. Defaults to 110.0

maxiterint, optional

Maximum number of iterations to perform. Defaults to 1000.

Returns
xa, xb, xcfloat

Bracket.

fa, fb, fcfloat

Objective function values in bracket.

funcallsint

Number of function evaluations made.

Previous topic

scipy.optimize.check_grad

Next topic

scipy.optimize.line_search