12 #ifndef MLPACK_CORE_OPTIMIZERS_KATYUSHA_KATYUSHA_HPP 13 #define MLPACK_CORE_OPTIMIZERS_KATYUSHA_KATYUSHA_HPP 18 namespace optimization {
62 template<
bool Proximal = false>
87 const double lipschitz = 10.0,
88 const size_t batchSize = 32,
89 const size_t maxIterations = 1000,
90 const size_t innerIterations = 0,
91 const double tolerance = 1e-5,
92 const bool shuffle =
true);
104 template<
typename DecomposableFunctionType>
105 double Optimize(DecomposableFunctionType&
function, arma::mat& iterate);
153 size_t maxIterations;
156 size_t innerIterations;
182 #include "katyusha_impl.hpp" size_t MaxIterations() const
Get the maximum number of iterations (0 indicates no limit).
The core includes that mlpack expects; standard C++ includes and Armadillo.
double Convexity() const
Get the convexity parameter.
double Optimize(DecomposableFunctionType &function, arma::mat &iterate)
Optimize the given function using Katyusha.
double & Lipschitz()
Modify the lipschitz parameter.
bool Shuffle() const
Get whether or not the individual functions are shuffled.
size_t & InnerIterations()
Modify the maximum number of iterations (0 indicates default n / b).
size_t & BatchSize()
Modify the batch size.
KatyushaType(const double convexity=1.0, const double lipschitz=10.0, const size_t batchSize=32, const size_t maxIterations=1000, const size_t innerIterations=0, const double tolerance=1e-5, const bool shuffle=true)
Construct the Katyusha optimizer with the given function and parameters.
bool & Shuffle()
Modify whether or not the individual functions are shuffled.
size_t InnerIterations() const
Get the maximum number of iterations (0 indicates default n / b).
Katyusha is a direct, primal-only stochastic gradient method which uses a "negative momentum" on top ...
size_t BatchSize() const
Get the batch size.
size_t & MaxIterations()
Modify the maximum number of iterations (0 indicates no limit).
double Lipschitz() const
Get the lipschitz parameter.
double & Tolerance()
Modify the tolerance for termination.
double Tolerance() const
Get the tolerance for termination.
double & Convexity()
Modify the convexity parameter.