12 #ifndef MLPACK_CORE_OPTIMIZERS_PROBLEMS_SGD_TEST_FUNCTION_HPP 13 #define MLPACK_CORE_OPTIMIZERS_PROBLEMS_SGD_TEST_FUNCTION_HPP 18 namespace optimization {
28 arma::Col<size_t> visitationOrder;
46 double Evaluate(
const arma::mat& coordinates,
const size_t i)
const;
49 double Evaluate(
const arma::mat& coordinates,
51 const size_t batchSize)
const;
54 void Gradient(
const arma::mat& coordinates,
56 arma::mat& gradient)
const;
59 void Gradient(
const arma::mat& coordinates,
62 const size_t batchSize)
const;
Very, very simple test function which is the composite of three other functions.
size_t NumFunctions() const
Return 3 (the number of functions).
The core includes that mlpack expects; standard C++ includes and Armadillo.
SGDTestFunction()
Initialize the SGDTestFunction.
void Shuffle()
Shuffle the order of function visitation.
arma::mat GetInitialPoint() const
Get the starting point.
void Gradient(const arma::mat &coordinates, const size_t i, arma::mat &gradient) const
Evaluate the gradient of a function.
double Evaluate(const arma::mat &coordinates, const size_t i) const
Evaluate a function.