test_function.hpp
Go to the documentation of this file.00001
00022 #ifndef __MLPACK_CORE_OPTIMIZERS_SGD_TEST_FUNCTION_HPP
00023 #define __MLPACK_CORE_OPTIMIZERS_SGD_TEST_FUNCTION_HPP
00024
00025 #include <mlpack/core.hpp>
00026
00027 namespace mlpack {
00028 namespace optimization {
00029 namespace test {
00030
00035 class SGDTestFunction
00036 {
00037 public:
00039 SGDTestFunction() { }
00040
00042 size_t NumFunctions() const { return 3; }
00043
00045 arma::mat GetInitialPoint() const { return arma::mat("6; -45.6; 6.2"); }
00046
00048 double Evaluate(const arma::mat& coordinates, const size_t i) const;
00049
00051 void Gradient(const arma::mat& coordinates,
00052 const size_t i,
00053 arma::mat& gradient) const;
00054 };
00055
00056 };
00057 };
00058 };
00059
00060 #endif