mlpack
master
|
The Generalized Rosenbrock function in n dimensions, defined by f(x) = sum_i^{n - 1} (f(i)(x)) f_i(x) = 100 * (x_i^2 - x_{i + 1})^2 + (1 - x_i)^2 x_0 = [-1.2, 1, -1.2, 1, ...]. More...
Public Member Functions | |
GeneralizedRosenbrockFunction (int n) | |
double | Evaluate (const arma::mat &coordinates) const |
double | Evaluate (const arma::mat &coordinates, const size_t i) const |
const arma::mat & | GetInitialPoint () const |
void | Gradient (const arma::mat &coordinates, arma::mat &gradient) const |
void | Gradient (const arma::mat &coordinates, const size_t i, arma::mat &gradient) const |
size_t | NumFunctions () const |
Private Attributes | |
arma::mat | initialPoint |
int | n |
The Generalized Rosenbrock function in n dimensions, defined by f(x) = sum_i^{n - 1} (f(i)(x)) f_i(x) = 100 * (x_i^2 - x_{i + 1})^2 + (1 - x_i)^2 x_0 = [-1.2, 1, -1.2, 1, ...].
This should optimize to f(x) = 0, at x = [1, 1, 1, 1, ...].
This function can also be used for stochastic gradient descent (SGD) as a decomposable function (DecomposableFunctionType), so there are other overloads of Evaluate() and Gradient() implemented, as well as NumFunctions().
"An analysis of the behavior of a glass of genetic adaptive systems." K.A. De Jong. Ph.D. thesis, University of Michigan, 1975.
Definition at line 113 of file test_functions.hpp.
mlpack::optimization::test::GeneralizedRosenbrockFunction::GeneralizedRosenbrockFunction | ( | int | n | ) |
double mlpack::optimization::test::GeneralizedRosenbrockFunction::Evaluate | ( | const arma::mat & | coordinates | ) | const |
double mlpack::optimization::test::GeneralizedRosenbrockFunction::Evaluate | ( | const arma::mat & | coordinates, |
const size_t | i | ||
) | const |
const arma::mat& mlpack::optimization::test::GeneralizedRosenbrockFunction::GetInitialPoint | ( | ) | const |
void mlpack::optimization::test::GeneralizedRosenbrockFunction::Gradient | ( | const arma::mat & | coordinates, |
arma::mat & | gradient | ||
) | const |
void mlpack::optimization::test::GeneralizedRosenbrockFunction::Gradient | ( | const arma::mat & | coordinates, |
const size_t | i, | ||
arma::mat & | gradient | ||
) | const |
|
inline |
|
private |
Definition at line 135 of file test_functions.hpp.
|
private |
Definition at line 136 of file test_functions.hpp.