Frank-Wolfe is a technique to minimize a continuously differentiable convex function
over a compact convex subset
of a vector space.
More...
Public Member Functions | |
| FrankWolfe (const LinearConstrSolverType linearConstrSolver, const UpdateRuleType updateRule, const size_t maxIterations=100000, const double tolerance=1e-10) | |
| Construct the Frank-Wolfe optimizer with the given function and parameters. More... | |
| const LinearConstrSolverType & | LinearConstrSolver () const |
| Get the linear constrained solver. More... | |
| LinearConstrSolverType & | LinearConstrSolver () |
| Modify the linear constrained solver. 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... | |
template < typename FunctionType > | |
| double | Optimize (FunctionType &function, arma::mat &iterate) |
| Optimize the given function using FrankWolfe. More... | |
| double | Tolerance () const |
| Get the tolerance for termination. More... | |
| double & | Tolerance () |
| Modify the tolerance for termination. More... | |
| const UpdateRuleType & | UpdateRule () const |
| Get the update rule. More... | |
| UpdateRuleType & | UpdateRule () |
| Modify the update rule. More... | |
Frank-Wolfe is a technique to minimize a continuously differentiable convex function
over a compact convex subset
of a vector space.
It is also known as conditional gradient method.
To find minimum of a function using Frank-Wolfe in each iteration
:
using UpdateRule:
, or use Fully-Corrective Variant:
The algorithm continues until
reaches the maximum number of iterations, or when the duality gap is bounded by a certain tolerance
. That is,
we also know that
, where
is the optimal solution.
The parameter
is specified by the tolerance parameter to the constructor.
For FrankWolfe to work, LinearConstrSolverType and UpdateRuleType template parameters are required. These classes must implement the following functions:
LinearConstrSolverType:
void Optimize(const arma::mat& gradient, arma::mat& s);
UpdateRuleType:
void Update(const arma::mat& old_coords, const arma::mat& s, arma::mat& new_coords, const size_t num_iter);
| LinearConstrSolverType | Solver for the linear constrained problem. |
| UpdateRuleType | Rule to update the solution in each iteration. |
Definition at line 81 of file frank_wolfe.hpp.
| FrankWolfe | ( | const LinearConstrSolverType | linearConstrSolver, |
| const UpdateRuleType | updateRule, | ||
| const size_t | maxIterations = 100000, |
||
| const double | tolerance = 1e-10 |
||
| ) |
Construct the Frank-Wolfe optimizer with the given function and parameters.
Notice that the constraint domain
is input at the initialization of linear_constr_solver, the function to be optimized is stored in update_rule.
| linearConstrSolver | Solver for linear constrained problem. |
| updateRule | Rule for updating solution in each iteration. |
| maxIterations | Maximum number of iterations allowed (0 means no limit). |
| tolerance | Maximum absolute tolerance to terminate algorithm. |
|
inline |
Get the linear constrained solver.
Definition at line 121 of file frank_wolfe.hpp.
|
inline |
Modify the linear constrained solver.
Definition at line 124 of file frank_wolfe.hpp.
|
inline |
Get the maximum number of iterations (0 indicates no limit).
Definition at line 132 of file frank_wolfe.hpp.
|
inline |
Modify the maximum number of iterations (0 indicates no limit).
Definition at line 134 of file frank_wolfe.hpp.
| double Optimize | ( | FunctionType & | function, |
| arma::mat & | iterate | ||
| ) |
Optimize the given function using FrankWolfe.
The given starting point will be modified to store the finishing point of the algorithm, the final objective value is returned.
FunctionType template class must provide the following functions:
double Evaluate(const arma::mat& coordinates); void Gradient(const arma::mat& coordinates, arma::mat& gradient);
| function | Function to be optimized. |
| iterate | Input with starting point, and will be modified to save the output optimial solution coordinates. |
|
inline |
Get the tolerance for termination.
Definition at line 137 of file frank_wolfe.hpp.
|
inline |
Modify the tolerance for termination.
Definition at line 139 of file frank_wolfe.hpp.
|
inline |
Get the update rule.
Definition at line 127 of file frank_wolfe.hpp.
|
inline |
Modify the update rule.
Definition at line 129 of file frank_wolfe.hpp.