#include <shark/Algorithms/DirectSearch/CMSA.h>
Inheritance diagram for shark::CMSA:Public Member Functions | |
| CMSA (random::rng_type &rng=random::globalRng) | |
| Default c'tor. | |
| std::string | name () const |
| From INameable: return the class name. | |
| SHARK_EXPORT_SYMBOL void | read (InArchive &archive) |
| Read the component from the supplied archive. | |
| SHARK_EXPORT_SYMBOL void | write (OutArchive &archive) const |
| Write the component to the supplied archive. | |
| SHARK_EXPORT_SYMBOL void | init (ObjectiveFunctionType const &function, SearchPointType const &p) |
| Initializes the algorithm for the supplied objective function. | |
| SHARK_EXPORT_SYMBOL void | init (ObjectiveFunctionType const &function, SearchPointType const &initialSearchPoint, std::size_t lambda, std::size_t mu, double initialSigma, const boost::optional< RealMatrix > &initialCovarianceMatrix=boost::optional< RealMatrix >()) |
| Initializes the algorithm for the supplied objective function. | |
| SHARK_EXPORT_SYMBOL void | step (ObjectiveFunctionType const &function) |
| Executes one iteration of the algorithm. | |
| void | setInitialSigma (double initSigma) |
| sets the initial step length sigma | |
| void | setMu (std::size_t mu) |
| Sets the number of selected samples. | |
| void | setLambda (std::size_t lambda) |
| Sets the number of sampled points. | |
| std::size_t | mu () const |
| Accesses the size of the parent population. | |
| std::size_t | lambda () const |
| Accesses the size of the offspring population. | |
| RealVector | eigenValues () const |
| double | sigma () const |
Public Member Functions inherited from shark::AbstractSingleObjectiveOptimizer< RealVector > | |
| std::size_t | numInitPoints () const |
| By default most single objective optimizers only require a single point. | |
| virtual void | init (ObjectiveFunctionType const &function, std::vector< SearchPointType > const &initPoints) |
| Initialize the optimizer for the supplied objective function using a set of initialisation points. | |
| virtual const SolutionType & | solution () const |
| returns the current solution of the optimizer | |
Public Member Functions inherited from shark::AbstractOptimizer< PointType, ResultT, SolutionTypeT > | |
| const Features & | features () const |
| virtual void | updateFeatures () |
| bool | requiresValue () const |
| bool | requiresFirstDerivative () const |
| bool | requiresSecondDerivative () const |
| bool | canSolveConstrained () const |
| bool | requiresClosestFeasible () const |
| virtual | ~AbstractOptimizer () |
| virtual void | init (ObjectiveFunctionType const &function) |
| Initialize the optimizer for the supplied objective function. | |
| virtual void | init (ObjectiveFunctionType const &function, std::vector< SearchPointType > const &initPoints)=0 |
| Initialize the optimizer for the supplied objective function using a set of initialisation points. | |
| virtual void | step (ObjectiveFunctionType const &function)=0 |
| Carry out one step of the optimizer for the supplied objective function. | |
Public Member Functions inherited from shark::INameable | |
| virtual | ~INameable () |
Public Member Functions inherited from shark::ISerializable | |
| virtual | ~ISerializable () |
| Virtual d'tor. | |
| void | load (InArchive &archive, unsigned int version) |
| Versioned loading of components, calls read(...). | |
| void | save (OutArchive &archive, unsigned int version) const |
| Versioned storing of components, calls write(...). | |
| BOOST_SERIALIZATION_SPLIT_MEMBER () | |
Protected Types | |
| typedef Individual< RealVector, double, LightChromosome > | IndividualType |
| The type of individual used by the CMSA. | |
Protected Member Functions | |
| SHARK_EXPORT_SYMBOL std::vector< IndividualType > | generateOffspring () const |
| Samples lambda individuals from the search distribution | |
| SHARK_EXPORT_SYMBOL void | updatePopulation (std::vector< IndividualType > const &offspring) |
| Updates the strategy parameters based on the supplied offspring population. | |
| SHARK_EXPORT_SYMBOL void | doInit (std::vector< SearchPointType > const &points, std::vector< ResultType > const &functionValues, std::size_t lambda, std::size_t mu, double initialSigma) |
| Initializes the internal data structures of the CMSA. | |
Protected Member Functions inherited from shark::AbstractOptimizer< PointType, ResultT, SolutionTypeT > | |
| 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. | |
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
|
protected |
|
inline |
Default c'tor.
Definition at line 74 of file CMSA.h.
References shark::AbstractOptimizer< PointType, ResultT, SolutionTypeT >::m_features, and shark::AbstractOptimizer< PointType, ResultT, SolutionTypeT >::REQUIRES_VALUE.
|
protected |
Initializes the internal data structures of the CMSA.
|
inline |
Definition at line 138 of file CMSA.h.
References shark::MultiVariateNormalDistributionCholesky::lowerCholeskyFactor(), and shark::sqr().
|
protected |
Samples lambda individuals from the search distribution
| SHARK_EXPORT_SYMBOL void shark::CMSA::init | ( | ObjectiveFunctionType const & | function, |
| SearchPointType const & | initialSearchPoint, | ||
| std::size_t | lambda, | ||
| std::size_t | mu, | ||
| double | initialSigma, | ||
| const boost::optional< RealMatrix > & | initialCovarianceMatrix = boost::optional< RealMatrix >() |
||
| ) |
Initializes the algorithm for the supplied objective function.
|
virtual |
Initializes the algorithm for the supplied objective function.
Implements shark::AbstractSingleObjectiveOptimizer< RealVector >.
|
inline |
Accesses the size of the offspring population.
Definition at line 134 of file CMSA.h.
Referenced by setLambda().
|
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.
|
inline |
|
inline |
|
inline |
| SHARK_EXPORT_SYMBOL void shark::CMSA::step | ( | ObjectiveFunctionType const & | function | ) |
Executes one iteration of the algorithm.
|
protected |
Updates the strategy parameters based on the supplied offspring population.
|
virtual |
Write the component to the supplied archive.
| [in,out] | archive | The archive to write to. |
Reimplemented from shark::ISerializable.