Implements a Limited-Memory-CMA. More...
#include <shark/Algorithms/DirectSearch/LMCMA.h>
Inheritance diagram for shark::LMCMA:Public Member Functions | |
| LMCMA (DefaultRngType &rng=Rng::globalRng) | |
| Default c'tor. More... | |
| std::string | name () const |
| From INameable: return the class name. More... | |
| unsigned | suggestLambda (unsigned int dimension) |
| Calculates lambda for the supplied dimensionality n. More... | |
| double | suggestMu (unsigned int lambda) |
| Calculates mu for the supplied lambda and the recombination strategy. More... | |
| void | init (ObjectiveFunctionType &function, SearchPointType const &p) |
| Initializes the algorithm for the supplied objective function. More... | |
| void | init (ObjectiveFunctionType &function, SearchPointType const &initialSearchPoint, unsigned int lambda, double mu, double initialSigma) |
| Initializes the algorithm for the supplied objective function. More... | |
| void | step (ObjectiveFunctionType const &function) |
| Executes one iteration of the algorithm. More... | |
| double | sigma () const |
| Accesses the current step size. More... | |
| RealVector const & | mean () const |
| Accesses the current population mean. More... | |
| RealVector const & | weights () const |
| Accesses the current weighting vector. More... | |
| RealVector const & | evolutionPath () const |
| Accesses the evolution path for the covariance matrix update. More... | |
| unsigned int | mu () const |
| Returns the size of the parent population \(\mu\). More... | |
| unsigned int & | mu () |
| Returns a mutabl rference to the size of the parent population \(\mu\). More... | |
| unsigned int | lambda () const |
| Returns a immutable reference to the size of the offspring population \(\mu\). More... | |
| unsigned int & | lambda () |
| Returns a mutable reference to the size of the offspring population \(\mu\). More... | |
Public Member Functions inherited from shark::AbstractSingleObjectiveOptimizer< RealVector > | |
| virtual void | init (ObjectiveFunctionType &function) |
| virtual const SolutionType & | solution () const |
| returns the current solution of the optimizer More... | |
Public Member Functions inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
| 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... | |
Public Member Functions inherited from shark::INameable | |
| virtual | ~INameable () |
Public Member Functions inherited from shark::ISerializable | |
| virtual | ~ISerializable () |
| Virtual d'tor. More... | |
| virtual void | read (InArchive &archive) |
| Read the component from the supplied archive. More... | |
| virtual void | write (OutArchive &archive) const |
| Write the component to the supplied archive. 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 () | |
Additional Inherited Members | |
Public Types inherited from shark::AbstractSingleObjectiveOptimizer< RealVector > | |
| typedef base_type::SearchPointType | SearchPointType |
| typedef base_type::SolutionType | SolutionType |
| typedef base_type::ResultType | ResultType |
| typedef base_type::ObjectiveFunctionType | ObjectiveFunctionType |
Public Types inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
| 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 |
Protected Member Functions inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
| 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... | |
Protected Attributes inherited from shark::AbstractSingleObjectiveOptimizer< RealVector > | |
| SolutionType | m_best |
| current solution of the optimizer More... | |
Protected Attributes inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
| Features | m_features |
Implements a Limited-Memory-CMA.
This is the algorithm as proposed in Ilya Loshchilov, "A Computationally Efficient Limited Memory CMA-ES for Large Scale Optimization" with a few corrections regarding the covariance matrix update.
The algorithm stores a subset of previous evolution path vectors and approximates the covariance matrix based on this. This algorithm only requires O(nm) memory, where n is the dimensionality and n the problem dimensionality. To be more exact, 2*m vectors of size n are stored to calculate the matrix-vector product with the choelsky factor of the covariance matrix in O(mn).
The algorithm uses the population based step size adaptation strategy as proposed in the same paper.
|
inline |
|
inline |
|
inlinevirtual |
Initializes the algorithm for the supplied objective function.
Implements shark::AbstractSingleObjectiveOptimizer< RealVector >.
Definition at line 228 of file LMCMA.h.
References shark::blas::init(), and lambda.
|
inline |
Initializes the algorithm for the supplied objective function.
Definition at line 240 of file LMCMA.h.
References lambda, shark::blas::repeat(), shark::sqr(), and shark::blas::sum().
|
inline |
|
inline |
Returns a mutable reference to the size of the offspring population \(\mu\).
Definition at line 339 of file LMCMA.h.
References shark::gauss(), and shark::blas::noalias().
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
From INameable: return the class name.
Reimplemented from shark::INameable.
|
inline |
|
inlinevirtual |
Executes one iteration of the algorithm.
Implements shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > >.
Definition at line 280 of file LMCMA.h.
References lambda.
|
inline |
Calculates lambda for the supplied dimensionality n.
Definition at line 213 of file LMCMA.h.
References lambda, and shark::blas::min().
|
inline |
|
inline |