bundles / scipy 1.17.1 / scipy / optimize / _lbfgsb_py / _minimize_lbfgsb
function
scipy.optimize._lbfgsb_py:_minimize_lbfgsb
Signature
def _minimize_lbfgsb ( fun , x0 , args = () , jac = None , bounds = None , disp = <object object at 0x0000> , maxcor = 10 , ftol = 2.220446049250313e-09 , gtol = 1e-05 , eps = 1e-08 , maxfun = 15000 , maxiter = 15000 , iprint = <object object at 0x0000> , callback = None , maxls = 20 , finite_diff_rel_step = None , workers = None , ** unknown_options ) Summary
Minimize a scalar function of one or more variables using the L-BFGS-B algorithm.
Parameters
disp: None or intDeprecated option that previously controlled the text printed on the screen during the problem solution. Now the code does not emit any output and this keyword has no function.
maxcor: intThe maximum number of variable metric corrections used to define the limited memory matrix. (The limited memory BFGS method does not store the full hessian but uses this many terms in an approximation to it.)
ftol: floatThe iteration stops when
(f^k - f^{k+1})/max{|f^k|,|f^{k+1}|,1} <= ftol.gtol: floatThe iteration will stop when
max{|proj g_i | i = 1, ..., n} <= gtolwhereproj g_iis the i-th component of the projected gradient.eps: float or ndarrayIf
jac is Nonethe absolute step size used for numerical approximation of the jacobian via forward differences.maxfun: intMaximum number of function evaluations before minimization terminates. Note that this function may violate the limit if the gradients are evaluated by numerical differentiation.
maxiter: intMaximum number of algorithm iterations.
iprint: int, optionalDeprecated option that previously controlled the text printed on the screen during the problem solution. Now the code does not emit any output and this keyword has no function.
maxls: int, optionalMaximum number of line search steps (per iteration). Default is 20.
finite_diff_rel_step: None or array_like, optionalIf
jac in ['2-point', '3-point', 'cs']the relative step size to use for numerical approximation of the jacobian. The absolute step size is computed ash = rel_step * sign(x) * max(1, abs(x)), possibly adjusted to fit into the bounds. Formethod='3-point'the sign ofhis ignored. If None (default) then step is selected automatically.workers: int, map-like callable, optionalA map-like callable, such as
multiprocessing.Pool.mapfor evaluating any numerical differentiation in parallel. This evaluation is carried out asworkers(fun, iterable).
Notes
The option ftol is exposed via the scipy.optimize.minimize interface, but calling scipy.optimize.fmin_l_bfgs_b directly exposes factr. The relationship between the two is ftol = factr * numpy.finfo(float).eps. I.e., factr multiplies the default machine floating-point precision to arrive at ftol. If the minimization is slow to converge the optimizer may halt if the total number of function evaluations exceeds maxfun, or the number of algorithm iterations has reached maxiter (whichever comes first). If this is the case then result.success=False, and an appropriate error message is contained in result.message.
Aliases
-
scipy.optimize._lbfgsb_py._minimize_lbfgsb