Static Line Search
Static line search is the simplest form of line search in which the guess for $\alpha$ is always just a fixed value. In the following we demonstrate how to use this line search.
Example
We show how to use linesearches in SimpleSolvers to solve a simple toy problem:
x = [1., 0., 0.]
f = x -> sum(x .^ 3 / 6 + x .^ 2 / 2)
obj = OptimizerProblem(f, x)
α = .1
ls_method = Static(α)SimpleSolvers contains a function SimpleSolvers.linesearch_problem that allocates a SimpleSolvers.LinesearchProblem that only depends on $\alpha$:
cache = NewtonOptimizerCache(x)
state = NewtonOptimizerState(x)
grad = GradientAutodiff{Float64}(obj.F, length(x))
update!(cache, state, grad, x)
x₂ = [.9, 0., 0.]
update!(cache, state, grad, x₂)
ls_obj = linesearch_problem(obj, grad, cache)We now use this to compute a static line search:
ls = Linesearch(ls_obj, ls_method)
solve(ls, 1.0)0.1