cyclic_descent.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_CORE_OPTIMIZERS_SCD_DESCENT_POLICIES_CYCLIC_HPP
13 #define MLPACK_CORE_OPTIMIZERS_SCD_DESCENT_POLICIES_CYCLIC_HPP
14 
15 #include <mlpack/core.hpp>
16 
17 namespace mlpack {
18 namespace optimization {
19 
39 {
40  public:
52  template <typename ResolvableFunctionType>
53  static size_t DescentFeature(const size_t iteration,
54  const arma::mat& /* iterate */,
55  const ResolvableFunctionType& function)
56  {
57  return iteration % function.NumFeatures();
58  }
59 };
60 
61 } // namespace optimization
62 } // namespace mlpack
63 
64 #endif
.hpp
Definition: add_to_po.hpp:21
Cyclic descent policy for Stochastic Coordinate Descent(SCD).
Include all of the base components required to write mlpack methods, and the main mlpack Doxygen docu...
static size_t DescentFeature(const size_t iteration, const arma::mat &, const ResolvableFunctionType &function)
The DescentFeature method is used to get the descent coordinate for the current iteration.