scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
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)

alpha > 0 is assumed to be a descent direction.

Notes

Uses the line search algorithm to enforce strong Wolfe conditions. See Wright and Nocedal, 'Numerical Optimization', 1999, pp. 59-61.

Parameters

phi : callable phi(alpha)

Objective scalar function.

derphi : callable phi'(alpha)

Objective function derivative. Returns a scalar.

phi0 : float, optional

Value of phi at 0.

old_phi0 : float, optional

Value of phi at previous point.

derphi0 : float, optional

Value of derphi at 0

c1 : float, optional

Parameter for Armijo condition rule.

c2 : float, optional

Parameter for curvature condition rule.

amax : float, optional

Maximum step size.

extra_condition : callable, optional

A callable of the form extra_condition(alpha, phi_value) returning a boolean. The line search accepts the value of alpha only if this callable returns True . If the callable returns False for the step length, the algorithm will continue with new iterates. The callable is only called for iterates satisfying the strong Wolfe conditions.

maxiter : int, optional

Maximum number of iterations to perform.

Returns

alpha_star : float or None

Best alpha, or None if the line search algorithm did not converge.

phi_star : float

phi at alpha_star.

phi0 : float

phi at 0.

derphi_star : float or None

derphi at alpha_star, or None if the line search algorithm did not converge.

Find alpha that satisfies strong Wolfe conditions.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.optimize._linesearch._zoom

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/optimize/_linesearch.py#316
type: <class 'function'>
Commit: