Turi Create
4.0
|
#include <ml/optimization/lbfgs.hpp>
Public Member Functions | |
lbfgs_solver (std::shared_ptr< first_order_opt_interface > _model) | |
void | setup (const DenseVector &init_point, const std::map< std::string, flexible_type > &opts, const std::shared_ptr< smooth_regularizer_interface > ®=nullptr) |
bool | next_iteration () |
const solver_status & | status () const |
Solve a first_order_optimization_iterface model with an LBFGS implementation.
The implementation is based on Algorithm 7.4 (pg 178) of [1].
This subroutine solves an unconstrained minimization problem using the limited memory BFGS method. The routine is especially effective on problems involving a large number of variables. In a typical iteration of this method an approximation Hk to the inverse of the Hessian is obtained by applying M BFGS updates to a diagonal matrix Hk0, using information from the previous M steps. The user specifies the number M, which determines the amount of storage required by the routine. The user may also provide the diagonal matrices Hk0 if not satisfied with the default choice. The algorithm is described in [2].
The user is required to calculate the function value and its gradient.
The steplength is determined at each iteration by means of the line search routine MCVSRCH, which is a slight modification of the routine CSRCH written by More' and Thuente.
References:
(1) Wright S.J and J. Nocedal. Numerical optimization. Vol. 2. New York: Springer, 1999.
(2) "On the limited memory BFGS method for large scale optimization", by D. Liu and J. Nocedal, Mathematical Programming B 45 (1989) 503-528.
[in] | model | Model with first order optimization interface. |
[in] | init_point | Starting point for the solver. |
[in] | opts | Solver options. |
[in] | reg | Shared ptr to an interface to a smooth regularizer. |
Vector | Sparse or dense gradient representation. |