14 #ifndef MLPACK_CORE_OPTIMIZERS_FW_UPDATE_FULL_CORRECTION_HPP 15 #define MLPACK_CORE_OPTIMIZERS_FW_UPDATE_FULL_CORRECTION_HPP 21 namespace optimization {
47 tau(tau), stepSize(stepSize)
61 const arma::mat& oldCoords,
67 arma::mat v = tau * s - oldCoords;
68 arma::mat b =
function.Vectorb();
69 arma::mat A =
function.MatrixA();
70 double gamma = arma::dot(b - A * oldCoords, A * v);
71 gamma = gamma / std::pow(arma::norm(A * v,
"fro"), 2);
72 gamma = std::min(gamma, 1.0);
74 atoms.
AddAtom(s,
function, gamma * tau);
Class to hold the information and operations of current atoms in the soluton space.
The core includes that mlpack expects; standard C++ includes and Armadillo.
const arma::vec & CurrentCoeffs() const
Get the current atom coefficients.
void RecoverVector(arma::mat &x)
Recover the solution coordinate from the coefficients of current atoms.
void Update(FuncSq &function, const arma::mat &oldCoords, const arma::mat &s, arma::mat &newCoords, const size_t)
Update rule for FrankWolfe, recalculate the coefficents of of current atoms, while satisfying the nor...
void ProjectedGradientEnhancement(FuncSq &function, double tau, double stepSize, size_t maxIteration=100, double tolerance=1e-3)
Enhance the solution in the convex hull of current atoms with atom norm constraint tau...
Full correction approach to update the solution.
UpdateFullCorrection(const double tau, const double stepSize)
Construct UpdateFullCorrection class.
void AddAtom(const arma::vec &v, FuncSq &function, const double c=0)
Add atom into the solution space.