bmrm (version 4.1)

wolfe.linesearch: Wolfe Line Search

Description

Implements Wolfe Line Search algorithm. The code is inspired from Matlab code of Do and Artiere, but not tested. The function is not used yet, but might be used later to speed up bmrm/nrbm convergence.

Usage

wolfe.linesearch(f, x0, s0, ..., a1 = 0.5, amax = 1.1, c1 = 1e-04,
  c2 = 0.9, maxiter = 5L, f.adjust = identity)

Arguments

f

a function to minimize. It must accept as first argument a numeric vector representing the optimization point and return a numeric value, with gradient attribute setted

x0

initial search point

s0

direction of the search from x0

...

additional parameters passed to f()

a1

first step coefficient guess

amax

max coefficient value

c1

lower bound

c2

upper bound

maxiter

maximum number of iteration for this linesearch

f.adjust

an adjustment method to adjust lvalue and gradient of f

Value

the optimal point

References

Do and Artieres Regularized Bundle Methods for Convex and Non-Convex Risks JMLR 2012

See Also

nrbm

Examples

Run this code
# NOT RUN {
fun <- function(w) {
  gradient(w) <- w
  lvalue(w) <- 0.5*sum(w*w)
  w
}
wolfe.linesearch(fun,fun(c(5,5)),c(-1,-1))
wolfe.linesearch(fun,fun(c(5,5)),c(1,1))
# }

Run the code above in your browser using DataCamp Workspace