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;
Very, very simple test function which is the composite of three other functions.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
double Evaluate(const arma::mat &coordinates, const size_t i) const
Evaluate a function.
SGDTestFunction()
Nothing to do for the constructor.
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.
size_t NumFunctions() const
Return 3 (the number of functions).