WolfeLS3

scalation.optimization.WolfeLS3
class WolfeLS3(f: FunctionV2S, var g: FunctionV2V, c1: Double, c2: Double, c3: Double, eg: Double)

The WolfeLS3 class performs an inexact line search on f to find (1) a point x that exhibits (1) SDC: sufficient decrease (f(x) enough less that f(0)) and (2) CC: the slope at x is less steep than the slope at 0. That is, the line search looks for a value for x satisfying the two Wolfe conditions.

f(x) <= f(0) + c1 * f'(0) * x Wolfe condition 1 (Armijo condition) |f'(x)| <= |c2 * f'(0)| Wolfe condition 2 (Strong version) f'(x) >= c2 * f'(0) Wolfe condition 2 (Weak version, more robust)

The it uses bisection (or interpolative search) to find an approximate local minimal point. Currently, the strong version is not supported. Note: c1 and c2 defaults below intended for Quasi Newton methods such as BFGS or L-BFGS

Value parameters

c1

constant for sufficient decrease (Wolfe condition 1: .0001 to .001)

c2

constant for curvature/slope constraint (Wolfe condition 2: .9 to .8)

c3

constant for noise control condition

eg

estimate of gradient noise

f

the objective/loss function to minimize

g

the gradient of the objective/loss function

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def lsearch(x: VectorD, p: VectorD, step: Double): (Double, Double)

Two-Phase Armijo-Wolfe Line Search and Lengthening: Initial Phase, Algorithm 3.2 in

Two-Phase Armijo-Wolfe Line Search and Lengthening: Initial Phase, Algorithm 3.2 in

Value parameters

p

the current search direction

step

the initial step size

x

the current point

Attributes

See also

arch.library.northwestern.edu/concern/generic_works/jm214p59n?locale=en

inline def noiseControl(p: VectorD, gx: VectorD, gy: VectorD): Boolean

Return whether the noise control condition is satisfied.

Return whether the noise control condition is satisfied.

Value parameters

gx

the gradient at original point x

gy

the gradient at new point y = x + p * a

p

the search direction

Attributes

def splitPhase(x: VectorD, fx: Double, gx: VectorD, p: VectorD, gxp: Double, a_: Double, b_: Double): (Double, Double)

Two-Phase Armijo-Wolfe Line Search and Lengthening: Split Phase, Algorithm 3.3 in

Two-Phase Armijo-Wolfe Line Search and Lengthening: Split Phase, Algorithm 3.3 in

Value parameters

a_

the initial step length

b_

the initial lengthening parameter

fx

the functional value at x

gx

the gradient at x

gxp

the dot product if g(x) and p

p

the search direction

x

the initial point

Attributes

See also

arch.library.northwestern.edu/concern/generic_works/jm214p59n?locale=en

inline def wolfe1(fx: Double, fy: Double, a: Double, gxp: Double): Boolean

Return whether Wolfe condition 1, the Sufficient Decrease Condition (SDC) is satisfied.

Return whether Wolfe condition 1, the Sufficient Decrease Condition (SDC) is satisfied.

Value parameters

a

the displacement in the search direction

fx

the functional value of the original point

fy

the functional value of the new point y = x + p * a

gxp

the dot product of the gradient vector g(x) and the search vector p

Attributes

inline def wolfe2(p: VectorD, gy: VectorD, gxp: Double): Boolean

Return whether Wolfe condition 2, the Curvature Condition (CC) is satisfied.

Return whether Wolfe condition 2, the Curvature Condition (CC) is satisfied.

Value parameters

gxp

the dot product of the gradient vector g(x) and the search vector p

gy

the gradient at new point y = x + p * a

p

the search direction vector

Attributes

Concrete fields

var g: FunctionV2V