LBFGS++
LBFGSpp::LBFGSParam< Scalar > Class Template Reference

#include <Param.h>

Public Member Functions

 LBFGSParam ()
 
void check_param () const
 

Public Attributes

int m
 
Scalar epsilon
 
int past
 
Scalar delta
 
int max_iterations
 
int linesearch
 
int max_linesearch
 
Scalar min_step
 
Scalar max_step
 
Scalar ftol
 
Scalar wolfe
 

Detailed Description

template<typename Scalar = double>
class LBFGSpp::LBFGSParam< Scalar >

Parameters to control the L-BFGS algorithm.

Definition at line 71 of file Param.h.

Constructor & Destructor Documentation

◆ LBFGSParam()

template<typename Scalar = double>
LBFGSpp::LBFGSParam< Scalar >::LBFGSParam ( )
inline

Constructor for L-BFGS parameters. Default values for parameters will be set when the object is created.

Definition at line 162 of file Param.h.

Member Function Documentation

◆ check_param()

template<typename Scalar = double>
void LBFGSpp::LBFGSParam< Scalar >::check_param ( ) const
inline

Checking the validity of L-BFGS parameters. An std::invalid_argument exception will be thrown if some parameter is invalid.

Definition at line 182 of file Param.h.

Member Data Documentation

◆ m

template<typename Scalar = double>
int LBFGSpp::LBFGSParam< Scalar >::m

The number of corrections to approximate the inverse Hessian matrix. The L-BFGS routine stores the computation results of previous m iterations to approximate the inverse Hessian matrix of the current iteration. This parameter controls the size of the limited memories (corrections). The default value is 6. Values less than 3 are not recommended. Large values will result in excessive computing time.

Definition at line 82 of file Param.h.

◆ epsilon

template<typename Scalar = double>
Scalar LBFGSpp::LBFGSParam< Scalar >::epsilon

Tolerance for convergence test. This parameter determines the accuracy with which the solution is to be found. A minimization terminates when \(||g|| < \epsilon\cdot\max(1, ||x||)\), where \(||\cdot||\) denotes the Euclidean (L2) norm. The default value is 1e-5.

Definition at line 91 of file Param.h.

◆ past

template<typename Scalar = double>
int LBFGSpp::LBFGSParam< Scalar >::past

Distance for delta-based convergence test. This parameter determines the distance \(d\) to compute the rate of decrease of the objective function, \(f_{k-d}(x)-f_k(x)\), where \(k\) is the current iteration step. If the value of this parameter is zero, the delta-based convergence test will not be performed. The default value is 0.

Definition at line 100 of file Param.h.

◆ delta

template<typename Scalar = double>
Scalar LBFGSpp::LBFGSParam< Scalar >::delta

Delta for convergence test. The algorithm stops when the following condition is met, \(|f_{k-d}(x)-f_k(x)|<\delta\cdot\max(1, |f_k(x)|, |f_{k-d}(x)|)\), where \(f_k(x)\) is the current function value, and \(f_{k-d}(x)\) is the function value \(d\) iterations ago (specified by the past parameter). The default value is 0.

Definition at line 109 of file Param.h.

◆ max_iterations

template<typename Scalar = double>
int LBFGSpp::LBFGSParam< Scalar >::max_iterations

The maximum number of iterations. The optimization process is terminated when the iteration count exceeds this parameter. Setting this parameter to zero continues an optimization process until a convergence or error. The default value is 0.

Definition at line 117 of file Param.h.

◆ linesearch

template<typename Scalar = double>
int LBFGSpp::LBFGSParam< Scalar >::linesearch

The line search termination condition. This parameter specifies the line search termination condition that will be used by the LBFGS routine. The default value is LBFGS_LINESEARCH_BACKTRACKING_ARMIJO.

Definition at line 123 of file Param.h.

◆ max_linesearch

template<typename Scalar = double>
int LBFGSpp::LBFGSParam< Scalar >::max_linesearch

The maximum number of trials for the line search. This parameter controls the number of function and gradients evaluations per iteration for the line search routine. The default value is 20.

Definition at line 129 of file Param.h.

◆ min_step

template<typename Scalar = double>
Scalar LBFGSpp::LBFGSParam< Scalar >::min_step

The minimum step length allowed in the line search. The default value is 1e-20. Usually this value does not need to be modified.

Definition at line 135 of file Param.h.

◆ max_step

template<typename Scalar = double>
Scalar LBFGSpp::LBFGSParam< Scalar >::max_step

The maximum step length allowed in the line search. The default value is 1e+20. Usually this value does not need to be modified.

Definition at line 141 of file Param.h.

◆ ftol

template<typename Scalar = double>
Scalar LBFGSpp::LBFGSParam< Scalar >::ftol

A parameter to control the accuracy of the line search routine. The default value is 1e-4. This parameter should be greater than zero and smaller than 0.5.

Definition at line 147 of file Param.h.

◆ wolfe

template<typename Scalar = double>
Scalar LBFGSpp::LBFGSParam< Scalar >::wolfe

The coefficient for the Wolfe condition. This parameter is valid only when the line-search algorithm is used with the Wolfe condition. The default value is 0.9. This parameter should be greater the ftol parameter and smaller than 1.0.

Definition at line 155 of file Param.h.


The documentation for this class was generated from the following file: