#include <shark/Algorithms/DirectSearch/CMSA.h>
Public Member Functions | |
CMSA () | |
Default c'tor. More... | |
std::string | name () const |
From INameable: return the class name. More... | |
template<typename Container , typename Extractor > | |
RealVector | cog (const Container &container, const Extractor &e) |
Calculates the center of gravity of the given population \( \in \mathbb{R}^d\). More... | |
SHARK_EXPORT_SYMBOL void | read (InArchive &archive) |
Read the component from the supplied archive. More... | |
SHARK_EXPORT_SYMBOL void | write (OutArchive &archive) const |
Write the component to the supplied archive. More... | |
SHARK_EXPORT_SYMBOL void | init (ObjectiveFunctionType &function, SearchPointType const &p) |
Initializes the algorithm for the supplied objective function. More... | |
SHARK_EXPORT_SYMBOL void | step (ObjectiveFunctionType const &function) |
Executes one iteration of the algorithm. More... | |
std::size_t | mu () const |
Accesses the size of the parent population. More... | |
std::size_t & | mu () |
Accesses the size of the parent population, allows for l-value semantics. More... | |
std::size_t | lambda () const |
Accesses the size of the offspring population. More... | |
std::size_t & | lambda () |
Accesses the size of the offspring population, allows for l-value semantics. More... | |
![]() | |
virtual void | init (ObjectiveFunctionType &function) |
virtual const SolutionType & | solution () const |
returns the current solution of the optimizer More... | |
![]() | |
const Features & | features () const |
virtual void | updateFeatures () |
bool | requiresValue () const |
bool | requiresFirstDerivative () const |
bool | requiresSecondDerivative () const |
bool | canSolveConstrained () const |
bool | requiresClosestFeasible () const |
virtual | ~AbstractOptimizer () |
Empty virtual d'tor. More... | |
![]() | |
virtual | ~INameable () |
![]() | |
virtual | ~ISerializable () |
Virtual d'tor. More... | |
void | load (InArchive &archive, unsigned int version) |
Versioned loading of components, calls read(...). More... | |
void | save (OutArchive &archive, unsigned int version) const |
Versioned storing of components, calls write(...). More... | |
BOOST_SERIALIZATION_SPLIT_MEMBER () | |
Protected Attributes | |
std::size_t | m_numberOfVariables |
Stores the dimensionality of the search space. More... | |
std::size_t | m_mu |
The size of the parent population. More... | |
std::size_t | m_lambda |
The size of the offspring population, needs to be larger than mu. More... | |
double | m_sigma |
The current step size. More... | |
double | m_cSigma |
double | m_cC |
Constant for adapting the covariance matrix. More... | |
RealVector | m_mean |
The current cog of the population. More... | |
shark::MultiVariateNormalDistribution | m_mutationDistribution |
Multi-variate normal mutation distribution. More... | |
![]() | |
SolutionType | m_best |
current solution of the optimizer More... | |
![]() | |
Features | m_features |
Additional Inherited Members | |
![]() | |
typedef base_type::SearchPointType | SearchPointType |
typedef base_type::SolutionType | SolutionType |
typedef base_type::ResultType | ResultType |
typedef base_type::ObjectiveFunctionType | ObjectiveFunctionType |
![]() | |
enum | Feature |
Models features that the optimizer requires from the objective function. More... | |
typedef RealVector | SearchPointType |
typedef double | ResultType |
typedef SingleObjectiveResultSet< RealVector > | SolutionType |
typedef AbstractObjectiveFunction< RealVector, ResultType > | ObjectiveFunctionType |
typedef TypedFlags< Feature > | Features |
typedef TypedFeatureNotAvailableException< Feature > | FeatureNotAvailableException |
![]() | |
void | checkFeatures (ObjectiveFunctionType const &objectiveFunction) |
Convenience function that checks whether the features of the supplied objective function match with the required features of the optimizer. More... | |
Implements the CMSA.
The algorithm is described in
H. G. Beyer, B. Sendhoff (2008). Covariance Matrix Adaptation Revisited: The CMSA Evolution Strategy In Proceedings of the Tenth International Conference on Parallel Problem Solving from Nature (PPSN X), pp. 123-132, LNCS, Springer-Verlag
|
inline |
Default c'tor.
Definition at line 82 of file CMSA.h.
References shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > >::m_features, and shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > >::REQUIRES_VALUE.
|
inline |
Calculates the center of gravity of the given population \( \in \mathbb{R}^d\).
Definition at line 96 of file CMSA.h.
References init(), m_mu, m_numberOfVariables, read(), SHARK_EXPORT_SYMBOL, step(), and write().
|
virtual |
Initializes the algorithm for the supplied objective function.
Implements shark::AbstractSingleObjectiveOptimizer< RealVector >.
Referenced by cog().
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
From INameable: return the class name.
Reimplemented from shark::INameable.
|
virtual |
Read the component from the supplied archive.
[in,out] | archive | The archive to read from. |
Reimplemented from shark::ISerializable.
Referenced by cog().
|
virtual |
Executes one iteration of the algorithm.
Implements shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > >.
Referenced by cog().
|
virtual |
Write the component to the supplied archive.
[in,out] | archive | The archive to write to. |
Reimplemented from shark::ISerializable.
Referenced by cog().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |