SG++-Doxygen-Documentation
sgpp::optimization::optimizer::CMAES Class Reference

Gradient-free CMA-ES method. More...

#include <CMAES.hpp>

Inheritance diagram for sgpp::optimization::optimizer::CMAES:
sgpp::optimization::optimizer::UnconstrainedOptimizer

Public Member Functions

void clone (std::unique_ptr< UnconstrainedOptimizer > &clone) const override
 
 CMAES (const ScalarFunction &f, size_t maxFcnEvalCount=DEFAULT_MAX_FCN_EVAL_COUNT)
 Constructor. More...
 
 CMAES (const CMAES &other)
 Copy constructor. More...
 
void optimize () override
 Pure virtual method for optimization of the objective function. More...
 
 ~CMAES () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
const base::DataMatrixgetHistoryOfOptimalPoints () const
 
const base::DataVectorgetHistoryOfOptimalValues () const
 
size_t getN () const
 
ScalarFunctiongetObjectiveFunction () const
 
const base::DataVectorgetOptimalPoint () const
 
double getOptimalValue () const
 
const base::DataVectorgetStartingPoint () const
 
void setN (size_t N)
 
void setStartingPoint (const base::DataVector &startingPoint)
 
 UnconstrainedOptimizer (const ScalarFunction &f, size_t N=DEFAULT_N)
 Constructor. More...
 
 UnconstrainedOptimizer (const UnconstrainedOptimizer &other)
 Copy constructor. More...
 
virtual ~UnconstrainedOptimizer ()
 Destructor. More...
 

Static Public Attributes

static const size_t DEFAULT_MAX_FCN_EVAL_COUNT = 1000
 default maximal number of function evaluations More...
 
- Static Public Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
static const size_t DEFAULT_N = 1000
 default maximal number of iterations or function evaluations More...
 

Additional Inherited Members

- Protected Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
std::unique_ptr< ScalarFunctionf
 objective function More...
 
base::DataVector fHist
 search history vector (optimal values) More...
 
double fOpt
 result of optimization (optimal function value) More...
 
size_t N
 maximal number of iterations or function evaluations More...
 
base::DataVector x0
 starting point More...
 
base::DataMatrix xHist
 search history matrix (optimal points) More...
 
base::DataVector xOpt
 result of optimization (location of optimum) More...
 

Detailed Description

Gradient-free CMA-ES method.

Constructor & Destructor Documentation

◆ CMAES() [1/2]

sgpp::optimization::optimizer::CMAES::CMAES ( const ScalarFunction f,
size_t  maxFcnEvalCount = DEFAULT_MAX_FCN_EVAL_COUNT 
)
explicit

Constructor.

The starting point is set to \((0.5, \dotsc, 0.5)^{\mathrm{T}}\).

Parameters
fobjective function
maxFcnEvalCountmaximal number of function evaluations

Referenced by clone().

◆ CMAES() [2/2]

sgpp::optimization::optimizer::CMAES::CMAES ( const CMAES other)

Copy constructor.

Parameters
otheroptimizer to be copied

◆ ~CMAES()

sgpp::optimization::optimizer::CMAES::~CMAES ( )
override

Destructor.

Member Function Documentation

◆ clone()

void sgpp::optimization::optimizer::CMAES::clone ( std::unique_ptr< UnconstrainedOptimizer > &  clone) const
overridevirtual
Parameters
[out]clonepointer to cloned object

Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.

References CMAES().

◆ optimize()

void sgpp::optimization::optimizer::CMAES::optimize ( )
overridevirtual

Pure virtual method for optimization of the objective function.

The result of the optimization process can be obtained by member functions, e.g., getOptimalPoint() and getOptimalValue().

Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.

References sgpp::base::DataVector::add(), sgpp::base::DataVector::append(), sgpp::base::DataMatrix::appendRow(), chess::b, python.utils.pca_normalize_dataset::C, D, sgpp::optimization::optimizer::UnconstrainedOptimizer::f, sgpp::optimization::optimizer::UnconstrainedOptimizer::fHist, sgpp::optimization::optimizer::UnconstrainedOptimizer::fOpt, sgpp::optimization::RandomNumberGenerator::getGaussianRN(), sgpp::optimization::RandomNumberGenerator::getInstance(), sgpp::optimization::Printer::getInstance(), python.statsfileInfo::i, python.utils.statsfile2gnuplot::j, sgpp::base::DataVector::l2Norm(), lambda, m, mu, sgpp::base::DataVector::mult(), sgpp::base::DataMatrix::mult(), sgpp::optimization::optimizer::UnconstrainedOptimizer::N, sgpp::combigrid::pow(), sgpp::optimization::Printer::printStatusBegin(), sgpp::optimization::Printer::printStatusEnd(), sgpp::optimization::Printer::printStatusUpdate(), sgpp::base::DataMatrix::resize(), sgpp::optimization::math::schurDecomposition(), sgpp::base::DataMatrix::setColumn(), sgpp::base::DataVector::sum(), analyse_erg::tmp, friedman::X, sgpp::optimization::optimizer::UnconstrainedOptimizer::x0, sgpp::optimization::optimizer::UnconstrainedOptimizer::xHist, and sgpp::optimization::optimizer::UnconstrainedOptimizer::xOpt.

Member Data Documentation

◆ DEFAULT_MAX_FCN_EVAL_COUNT

const size_t sgpp::optimization::optimizer::CMAES::DEFAULT_MAX_FCN_EVAL_COUNT = 1000
static

default maximal number of function evaluations


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