mlpack  git-master
UpdateLineSearch Class Reference

Use line search in the update step for FrankWolfe algorithm. More...

Public Member Functions

 UpdateLineSearch (const size_t maxIterations=100000, const double tolerance=1e-5)
 Construct the line search update rule. More...

 
size_t MaxIterations () const
 Get the maximum number of iterations (0 indicates no limit). More...

 
size_t & MaxIterations ()
 Modify the maximum number of iterations (0 indicates no limit). More...

 
double Tolerance () const
 Get the tolerance for termination. More...

 
double & Tolerance ()
 Modify the tolerance for termination. More...

 
template
<
typename
FunctionType
>
void Update (FunctionType &function, const arma::mat &oldCoords, const arma::mat &s, arma::mat &newCoords, const size_t)
 Update rule for FrankWolfe, optimize with line search using secant method. More...

 

Detailed Description

Use line search in the update step for FrankWolfe algorithm.

That is, take $ \gamma = arg\min_{\gamma\in [0, 1]} f((1-\gamma)x + \gamma s) $. The update rule would be:

\[ x_{k+1} = (1-\gamma) x_k + \gamma s \]

Definition at line 31 of file update_linesearch.hpp.

Constructor & Destructor Documentation

◆ UpdateLineSearch()

UpdateLineSearch ( const size_t  maxIterations = 100000,
const double  tolerance = 1e-5 
)
inline

Construct the line search update rule.

Parameters
maxIterMax number of iterations in line search.
toleranceTolerance for termination of line search.

Definition at line 40 of file update_linesearch.hpp.

Member Function Documentation

◆ MaxIterations() [1/2]

size_t MaxIterations ( ) const
inline

Get the maximum number of iterations (0 indicates no limit).

Definition at line 89 of file update_linesearch.hpp.

◆ MaxIterations() [2/2]

size_t& MaxIterations ( )
inline

Modify the maximum number of iterations (0 indicates no limit).

Definition at line 91 of file update_linesearch.hpp.

◆ Tolerance() [1/2]

double Tolerance ( ) const
inline

Get the tolerance for termination.

Definition at line 84 of file update_linesearch.hpp.

◆ Tolerance() [2/2]

double& Tolerance ( )
inline

Modify the tolerance for termination.

Definition at line 86 of file update_linesearch.hpp.

◆ Update()

void Update ( FunctionType &  function,
const arma::mat &  oldCoords,
const arma::mat &  s,
arma::mat &  newCoords,
const size_t   
)
inline

Update rule for FrankWolfe, optimize with line search using secant method.

FunctionType template parameters are required. This class must implement the following functions:

FunctionType:

double Evaluate(const arma::mat& coordinates); Evaluation of the function at specific coordinates.

void Gradient(const arma::mat& coordinates, arma::mat& gradient); Solve the gradient of the function at specific coordinate, returned in gradient.

Parameters
functionfunction to be optimized,
oldCoordsprevious solution coordinates, one end of line search.
scurrent linear_constr_solution result, the other end point of line search.
newCoordsoutput new solution coords.
numItercurrent iteration number, not used here.

Definition at line 70 of file update_linesearch.hpp.

References LineSearch::Optimize().


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