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 (const size_t n)
 
double Evaluate (const arma::mat &coordinates, const size_t begin, const size_t batchSize=1) const
 
double Evaluate (const arma::mat &coordinates) const
 
const arma::mat & GetInitialPoint () const
 Get the starting point. More...

 
void Gradient (const arma::mat &coordinates, const size_t begin, arma::mat &gradient, const size_t batchSize=1) const
 
void Gradient (const arma::mat &coordinates, const size_t begin, arma::sp_mat &gradient, const size_t count) const
 
void Gradient (const arma::mat &coordinates, arma::mat &gradient) const
 
size_t NumFunctions () const
 Return 1 (the number of functions). More...

 
void Shuffle ()
 Shuffle the order of function visitation. More...

 

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().

For more information, please refer to:

@phdthesis{Jong1975,
title = {Analysis of the behavior of a class of genetic adaptive
systems},
author = {De Jong, Kenneth Alan},
school = {Queensland University of Technology},
year = {1975},
type = {{PhD} dissertation},
}

Definition at line 48 of file generalized_rosenbrock_function.hpp.

Constructor & Destructor Documentation

◆ GeneralizedRosenbrockFunction()

GeneralizedRosenbrockFunction ( const size_t  n)

Member Function Documentation

◆ Evaluate() [1/2]

double Evaluate ( const arma::mat &  coordinates,
const size_t  begin,
const size_t  batchSize = 1 
) const

◆ Evaluate() [2/2]

double Evaluate ( const arma::mat &  coordinates) const

◆ GetInitialPoint()

const arma::mat& GetInitialPoint ( ) const
inline

◆ Gradient() [1/3]

void Gradient ( const arma::mat &  coordinates,
const size_t  begin,
arma::mat &  gradient,
const size_t  batchSize = 1 
) const

◆ Gradient() [2/3]

void Gradient ( const arma::mat &  coordinates,
const size_t  begin,
arma::sp_mat &  gradient,
const size_t  count 
) const

◆ Gradient() [3/3]

void Gradient ( const arma::mat &  coordinates,
arma::mat &  gradient 
) const

◆ NumFunctions()

size_t NumFunctions ( ) const
inline

Return 1 (the number of functions).

Definition at line 65 of file generalized_rosenbrock_function.hpp.

◆ Shuffle()

void Shuffle ( )

Shuffle the order of function visitation.

This may be called by the optimizer.


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