shark::VDCMA Class Reference

#include <shark/Algorithms/DirectSearch/VDCMA.h>

+ Inheritance diagram for shark::VDCMA:

Public Member Functions

 VDCMA (DefaultRngType &rng=Rng::globalRng)
 Default c'tor. More...
 
std::string name () const
 From INameable: return the class name. More...
 
std::size_t suggestLambda (std::size_t dimension)
 Calculates lambda for the supplied dimensionality n. More...
 
std::size_t suggestMu (std::size_t lambda)
 Calculates mu for the supplied lambda and the recombination strategy. More...
 
void init (ObjectiveFunctionType &function, SearchPointType const &p)
 initializes the optimizer using a predefined starting point More...
 
void init (ObjectiveFunctionType const &function, SearchPointType const &initialSearchPoint, std::size_t lambda, std::size_t 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...
 
void setSigma (double sigma)
 Accesses the current step size. More...
 
void setInitialSigma (double initialSigma)
 set the initial step size of the algorithm. 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...
 
RealVector const & evolutionPathSigma () const
 Accesses the evolution path for the step size update. More...
 
std::size_t mu () const
 Returns the size of the parent population \(\mu\). More...
 
std::size_t & mu ()
 Returns a mutabl reference to the size of the parent population \(\mu\). More...
 
std::size_t lambda () const
 Returns a immutable reference to the size of the offspring population \(\mu\). More...
 
std::size_t & 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 SolutionTypesolution () const
 returns the current solution of the optimizer More...
 
- Public Member Functions inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > >
const Featuresfeatures () 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, ResultTypeObjectiveFunctionType
 
typedef TypedFlags< FeatureFeatures
 
typedef TypedFeatureNotAvailableException< FeatureFeatureNotAvailableException
 
- 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
 

Detailed Description

Definition at line 52 of file VDCMA.h.

Constructor & Destructor Documentation

§ VDCMA()

Member Function Documentation

§ evolutionPath()

RealVector const& shark::VDCMA::evolutionPath ( ) const
inline

Accesses the evolution path for the covariance matrix update.

Definition at line 206 of file VDCMA.h.

§ evolutionPathSigma()

RealVector const& shark::VDCMA::evolutionPathSigma ( ) const
inline

Accesses the evolution path for the step size update.

Definition at line 211 of file VDCMA.h.

§ init() [1/2]

void shark::VDCMA::init ( ObjectiveFunctionType function,
SearchPointType const &  startingPoint 
)
inlinevirtual

§ init() [2/2]

void shark::VDCMA::init ( ObjectiveFunctionType const &  function,
SearchPointType const &  initialSearchPoint,
std::size_t  lambda,
std::size_t  mu,
double  initialSigma 
)
inline

§ lambda() [1/2]

std::size_t shark::VDCMA::lambda ( ) const
inline

Returns a immutable reference to the size of the offspring population \(\mu\).

Definition at line 226 of file VDCMA.h.

Referenced by init().

§ lambda() [2/2]

std::size_t& shark::VDCMA::lambda ( )
inline

Returns a mutable reference to the size of the offspring population \(\mu\).

Definition at line 231 of file VDCMA.h.

References shark::gauss(), shark::blas::inner_prod(), shark::blas::max(), shark::blas::min(), mu(), shark::blas::noalias(), shark::blas::norm_2(), and shark::sqr().

§ mean()

RealVector const& shark::VDCMA::mean ( ) const
inline

Accesses the current population mean.

Definition at line 196 of file VDCMA.h.

§ mu() [1/2]

std::size_t shark::VDCMA::mu ( ) const
inline

Returns the size of the parent population \(\mu\).

Definition at line 216 of file VDCMA.h.

Referenced by init(), and lambda().

§ mu() [2/2]

std::size_t& shark::VDCMA::mu ( )
inline

Returns a mutabl reference to the size of the parent population \(\mu\).

Definition at line 221 of file VDCMA.h.

§ name()

std::string shark::VDCMA::name ( ) const
inlinevirtual

From INameable: return the class name.

Reimplemented from shark::INameable.

Definition at line 66 of file VDCMA.h.

§ setInitialSigma()

void shark::VDCMA::setInitialSigma ( double  initialSigma)
inline

set the initial step size of the algorithm.

Sets the initial sigma at init to a given value. If this is 0, which it is by default, the default initialisation will be sigma= 1/sqrt(N) where N is the number of variables to optimize.

this method is the prefered one instead of init()

Definition at line 190 of file VDCMA.h.

§ setSigma()

void shark::VDCMA::setSigma ( double  sigma)
inline

Accesses the current step size.

Definition at line 179 of file VDCMA.h.

References sigma().

§ sigma()

double shark::VDCMA::sigma ( ) const
inline

Accesses the current step size.

Definition at line 174 of file VDCMA.h.

Referenced by init(), and setSigma().

§ step()

§ suggestLambda()

std::size_t shark::VDCMA::suggestLambda ( std::size_t  dimension)
inline

Calculates lambda for the supplied dimensionality n.

Definition at line 70 of file VDCMA.h.

Referenced by init().

§ suggestMu()

std::size_t shark::VDCMA::suggestMu ( std::size_t  lambda)
inline

Calculates mu for the supplied lambda and the recombination strategy.

Definition at line 75 of file VDCMA.h.

Referenced by init().

§ weights()

RealVector const& shark::VDCMA::weights ( ) const
inline

Accesses the current weighting vector.

Definition at line 201 of file VDCMA.h.


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