mlpack  2.2.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
GeneralizedRosenbrockFunction Class Reference

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
 

Detailed Description

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.

Constructor & Destructor Documentation

Member Function Documentation

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
inline

Definition at line 126 of file test_functions.hpp.


The documentation for this class was generated from the following file: