bundles / scipy 1.17.1 / scipy / optimize / _linesearch / scalar_search_wolfe2
function
scipy.optimize._linesearch:scalar_search_wolfe2
Signature
def scalar_search_wolfe2 ( phi , derphi , phi0 = None , old_phi0 = None , derphi0 = None , c1 = 0.0001 , c2 = 0.9 , amax = None , extra_condition = None , maxiter = 10 ) Summary
Find alpha that satisfies strong Wolfe conditions.
Extended Summary
alpha > 0 is assumed to be a descent direction.
Parameters
phi: callable phi(alpha)Objective scalar function.
derphi: callable phi'(alpha)Objective function derivative. Returns a scalar.
phi0: float, optionalValue of phi at 0.
old_phi0: float, optionalValue of phi at previous point.
derphi0: float, optionalValue of derphi at 0
c1: float, optionalParameter for Armijo condition rule.
c2: float, optionalParameter for curvature condition rule.
amax: float, optionalMaximum step size.
extra_condition: callable, optionalA callable of the form
extra_condition(alpha, phi_value)returning a boolean. The line search accepts the value ofalphaonly if this callable returnsTrue. If the callable returnsFalsefor the step length, the algorithm will continue with new iterates. The callable is only called for iterates satisfying the strong Wolfe conditions.maxiter: int, optionalMaximum number of iterations to perform.
Returns
alpha_star: float or NoneBest alpha, or None if the line search algorithm did not converge.
phi_star: floatphi at alpha_star.
phi0: floatphi at 0.
derphi_star: float or Nonederphi at alpha_star, or None if the line search algorithm did not converge.
Notes
Uses the line search algorithm to enforce strong Wolfe conditions. See Wright and Nocedal, 'Numerical Optimization', 1999, pp. 59-61.
Aliases
-
scipy.optimize._linesearch.scalar_search_wolfe2