12 #ifndef MLPACK_CORE_OPTIMIZERS_SGD_TEST_FUNCTION_HPP
13 #define MLPACK_CORE_OPTIMIZERS_SGD_TEST_FUNCTION_HPP
18 namespace optimization {
38 double Evaluate(
const arma::mat& coordinates,
const size_t i)
const;
41 void Gradient(
const arma::mat& coordinates,
43 arma::mat& gradient)
const;
size_t NumFunctions() const
Return 3 (the number of functions).
Very, very simple test function which is the composite of three other functions.
arma::mat GetInitialPoint() const
Get the starting point.
The core includes that mlpack expects; standard C++ includes and Armadillo.
SGDTestFunction()
Nothing to do for the constructor.
double Evaluate(const arma::mat &coordinates, const size_t i) const
Evaluate a function.
void Gradient(const arma::mat &coordinates, const size_t i, arma::mat &gradient) const
Evaluate the gradient of a function.