Skip to contents

Byrd, Lu, Nocedal and Zhu (1995): generalized Cauchy point of the compact limited-memory model B = theta I - W M W' (Algorithm CP), direct primal subspace minimisation over the free variables backtracked into the box, and a strong-Wolfe line search with maximal step 1. Pairs are kept when s'y > eps y'y (at most m). Stops when the projected gradient is at most pgtol or the relative reduction of f is at most factr times machine epsilon, the conventions of optim(method = "L-BFGS-B").

Usage

LbfgsbMinimize(
  f,
  x0,
  grad = NULL,
  lower = NULL,
  upper = NULL,
  m = 10,
  pgtol = 1e-08,
  factr = 1e+07,
  max_iter = 1000
)

Arguments

f

Objective.

x0

Starting point (projected onto the box).

grad

Gradient function; central differences when NULL.

lower, upper

Bounds (default unbounded).

m

Number of correction pairs.

pgtol, factr

Tolerances.

max_iter

Iteration cap.

Value

list(x, fun, grad, projected_gradient, n_iter, n_fev, converged, message).

References

Byrd, R. H., Lu, P., Nocedal, J. and Zhu, C. (1995). A limited memory algorithm for bound constrained optimization. SIAM Journal on Scientific Computing 16, 1190-1208.

Examples

rb <- function(x) (1 - x[1])^2 + 100 * (x[2] - x[1]^2)^2
LbfgsbMinimize(rb, c(-1.2, 1), lower = c(-2, -2), upper = c(0.5, 2))$x
#> [1] 0.50 0.25