Home

Awesome

LineSearches

Build Status Codecov branch

Description

This package provides an interface to line search algorithms implemented in Julia. The code was originally written as part of Optim, but has now been separated out to its own package.

Available line search algorithms

In the docs we show how to choose between the line search algorithms in Optim.

Available initial step length procedures

The package provides some procedures to calculate the initial step length that is passed to the line search algorithm. See the docs for its usage in Optim.

Documentation

For more details and options, see the documentation

Example usage

Here is how to get a simple linesearch for a one-dimensional function working:

using LineSearches

ϕ(x) = (x - π)^4
dϕ(x) = 4*(x-π)^3
ϕdϕ(x) = ϕ(x),dϕ(x)

α0 = 9.0
ϕ0 = ϕ(0.0)
dϕ0 = dϕ(0.0)

for ls in (Static,BackTracking,HagerZhang,MoreThuente,StrongWolfe)
    res = (ls())(ϕ, dϕ, ϕdϕ, α0, ϕ0,dϕ0)
    println(ls, ": ", res)
end

For more examples, see the documentation.

References