12 #ifndef MLPACK_CORE_OPTIMIZERS_SCD_SCD_HPP 13 #define MLPACK_CORE_OPTIMIZERS_SCD_SCD_HPP 19 namespace optimization {
61 template <
typename DescentPolicyType = RandomDescent>
82 SCD(
const double stepSize = 0.01,
83 const size_t maxIterations = 100000,
84 const double tolerance = 1e-5,
85 const size_t updateInterval = 1e3,
86 const DescentPolicyType descentPolicy = DescentPolicyType());
98 template <
typename ResolvableFunctionType>
99 double Optimize(ResolvableFunctionType&
function, arma::mat& iterate);
131 size_t maxIterations;
137 size_t updateInterval;
140 DescentPolicyType descentPolicy;
147 #include "scd_impl.hpp" double StepSize() const
Get the step size.
SCD(const double stepSize=0.01, const size_t maxIterations=100000, const double tolerance=1e-5, const size_t updateInterval=1e3, const DescentPolicyType descentPolicy=DescentPolicyType())
Construct the SCD optimizer with the given function and parameters.
double & StepSize()
Modify the step size.
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.
Stochastic Coordinate descent is a technique for minimizing a function by doing a line search along a...
DescentPolicyType DescentPolicy() const
Get the descent policy.
size_t & UpdateInterval()
Modify the update interval for reporting objective.
double Optimize(ResolvableFunctionType &function, arma::mat &iterate)
Optimize the given function using stochastic coordinate descent.
size_t UpdateInterval() const
Get the update interval for reporting objective.
double & Tolerance()
Modify the tolerance for termination.
double Tolerance() const
Get the tolerance for termination.
size_t & MaxIterations()
Modify the maximum number of iterations (0 indicates no limit).
DescentPolicyType & DescentPolicy()
Modify the descent policy.