|
mlpack
master
|
Very, very simple test function which is the composite of three other functions. More...
Public Member Functions | |
| SGDTestFunction () | |
| Nothing to do for the constructor. More... | |
| double | Evaluate (const arma::mat &coordinates, const size_t i) const |
| Evaluate a function. More... | |
| arma::mat | GetInitialPoint () const |
| Get the starting point. More... | |
| void | Gradient (const arma::mat &coordinates, const size_t i, arma::mat &gradient) const |
| Evaluate the gradient of a function. More... | |
| size_t | NumFunctions () const |
| Return 3 (the number of functions). More... | |
Very, very simple test function which is the composite of three other functions.
The gradient is not very steep far away from the optimum, so a larger step size may be required to optimize it in a reasonable number of iterations.
Definition at line 25 of file test_function.hpp.
|
inline |
Nothing to do for the constructor.
Definition at line 29 of file test_function.hpp.
| double mlpack::optimization::test::SGDTestFunction::Evaluate | ( | const arma::mat & | coordinates, |
| const size_t | i | ||
| ) | const |
Evaluate a function.
Referenced by GetInitialPoint().
|
inline |
Get the starting point.
Definition at line 35 of file test_function.hpp.
References Evaluate(), and Gradient().
| void mlpack::optimization::test::SGDTestFunction::Gradient | ( | const arma::mat & | coordinates, |
| const size_t | i, | ||
| arma::mat & | gradient | ||
| ) | const |
Evaluate the gradient of a function.
Referenced by GetInitialPoint().
|
inline |
Return 3 (the number of functions).
Definition at line 32 of file test_function.hpp.
1.8.11