LBFGS++
|
#include <LineSearchMoreThuente.h>
Static Public Member Functions | |
template<typename Foo , typename SolverParam > | |
static void | LineSearch (Foo &f, const SolverParam ¶m, const Vector &xp, const Vector &drt, const Scalar &step_max, Scalar &step, Scalar &fx, Vector &grad, Scalar &dg, Vector &x) |
The line search algorithm by Moré and Thuente (1994), currently used for the L-BFGS-B algorithm.
The target of this line search algorithm is to find a step size \(\alpha\) that satisfies the strong Wolfe condition \(f(x+\alpha d) \le f(x) + \alpha\mu g(x)^T d\) and \(|g(x+\alpha d)^T d| \le \eta|g(x)^T d|\). Our implementation is a simplified version of the algorithm in [1]. We assume that \(0<\mu<\eta<1\), while in [1] they do not assume \(\eta>\mu\). As a result, the algorithm in [1] has two stages, but in our implementation we only need the first stage to guarantee the convergence.
Reference: [1] Moré, J. J., & Thuente, D. J. (1994). Line search algorithms with guaranteed sufficient decrease.
Definition at line 26 of file LineSearchMoreThuente.h.
|
inlinestatic |
Line search by Moré and Thuente (1994).
f | A function object such that f(x, grad) returns the objective function value at x , and overwrites grad with the gradient. |
param | An LBFGSParam or LBFGSBParam object that stores the parameters of the solver. |
xp | The current point. |
drt | The current moving direction. |
step_max | The upper bound for the step size that makes x feasible. |
step | In: The initial step length. Out: The calculated step length. |
fx | In: The objective function value at the current point. Out: The function value at the new point. |
grad | In: The current gradient vector. Out: The gradient at the new point. |
dg | In: The inner product between drt and grad. Out: The inner product between drt and the new gradient. |
x | Out: The new point moved to. |
Definition at line 214 of file LineSearchMoreThuente.h.