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.
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
# 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))
# }