CMA Class Reference

Implements the most recent version of the non-elitist CMA-ES. More...

#include <CMA.h>

List of all members.

Public Types

enum  RecombType { equal, linear, superlinear }
enum  UpdateType { rankone, rankmu }

Public Member Functions

 CMA ()
virtual ~CMA ()
void init (unsigned dimension, std::vector< double > var, double _sigma, Population &p, RecombType recomb=superlinear, UpdateType cupdate=rankmu)
void init (unsigned dimension, double _sigma, Population &p, RecombType recomb=superlinear, UpdateType cupdate=rankmu)
void cog (ChromosomeT< double > &a, Population &p, unsigned c=0) const
 calculate weighted mean for intermediate recombination
void create (Individual &o)
 mutation after global intermediate recombination
void updateStrategyParameters (Population &p, double lowerBound=.0)
 do the update of the covariance matrix and the global step size
double getSigma () const
 get global setp size $\sigma$
void setSigma (double x)
 set global setp size $\sigma$
void setChi_n (double x)
 set different approximation for expectation of $\chi_n$ distribution
double getCondition () const
 get condition number of covariance matrix
const Array< double > & getC () const
 get covariance matrix
const Array< double > & getLambda () const
 get eigenvalues of covariance matrix

Static Public Member Functions

static unsigned suggestLambda (unsigned dimension)
static unsigned suggestMu (unsigned lambda, RecombType recomb=superlinear)

Protected Attributes

unsigned n
double sigma
double chi_n
double cc
double cs
double csu
double ccu
double ccov
double d
double mueff
double mucov
ChromosomeT< double > x
ChromosomeT< double > xPrime
ChromosomeT< double > meanz
Array< double > z
Array< double > pc
Array< double > ps
Array< double > C
Array< double > Z
Array< double > lambda
Array< double > B
Array< double > w
Array< double > theVector


Detailed Description

Implements the most recent version of the non-elitist CMA-ES.

Definition at line 59 of file CMA.h.


Member Enumeration Documentation

Enumerator:
equal 
linear 
superlinear 

Definition at line 68 of file CMA.h.

Enumerator:
rankone 
rankmu 

Definition at line 69 of file CMA.h.


Constructor & Destructor Documentation

CMA::CMA (  )  [inline]

Definition at line 62 of file CMA.h.

virtual CMA::~CMA (  )  [inline, virtual]

Definition at line 65 of file CMA.h.


Member Function Documentation

void CMA::cog ( ChromosomeT< double > &  a,
Population p,
unsigned  c = 0 
) const

calculate weighted mean for intermediate recombination

Definition at line 160 of file CMA.cpp.

References n, Population::size(), and w.

Referenced by init(), and updateStrategyParameters().

void CMA::create ( Individual o  ) 

mutation after global intermediate recombination

Definition at line 173 of file CMA.cpp.

References B, lambda, n, sigma, x, and z.

Referenced by CMASearch::run().

const Array< double > & CMA::getC (  )  const

get covariance matrix

Definition at line 272 of file CMA.cpp.

References C.

double CMA::getCondition (  )  const

get condition number of covariance matrix

Definition at line 265 of file CMA.cpp.

References lambda, and n.

const Array< double > & CMA::getLambda (  )  const

get eigenvalues of covariance matrix

Definition at line 279 of file CMA.cpp.

References lambda.

double CMA::getSigma (  )  const

get global setp size $\sigma$

Definition at line 244 of file CMA.cpp.

References sigma.

void CMA::init ( unsigned  dimension,
double  _sigma,
Population p,
RecombType  recomb = superlinear,
UpdateType  cupdate = rankmu 
)

Definition at line 149 of file CMA.cpp.

References init().

void CMA::init ( unsigned  dimension,
std::vector< double >  var,
double  _sigma,
Population p,
RecombType  recomb = superlinear,
UpdateType  cupdate = rankmu 
)

Definition at line 70 of file CMA.cpp.

References B, C, cc, ccov, ccu, chi_n, cog(), cs, csu, d, equal, lambda, linear, meanz, mucov, mueff, n, pc, ps, rankone, ChromosomeT_base< T >::resize(), sigma, Population::size(), superlinear, theVector, w, x, xPrime, Z, and z.

Referenced by CMASearch::init(), and init().

void CMA::setChi_n ( double  x  ) 

set different approximation for expectation of $\chi_n$ distribution

Definition at line 258 of file CMA.cpp.

References chi_n.

void CMA::setSigma ( double  x  ) 

set global setp size $\sigma$

Definition at line 251 of file CMA.cpp.

References sigma.

unsigned CMA::suggestLambda ( unsigned  dimension  )  [static]

Definition at line 56 of file CMA.cpp.

References lambda.

Referenced by CMASearch::init().

unsigned CMA::suggestMu ( unsigned  lambda,
RecombType  recomb = superlinear 
) [static]

Definition at line 65 of file CMA.cpp.

References equal.

Referenced by CMASearch::init().

void CMA::updateStrategyParameters ( Population p,
double  lowerBound = .0 
)

do the update of the covariance matrix and the global step size

Definition at line 194 of file CMA.cpp.

References B, C, cc, ccov, ccu, chi_n, cog(), cs, csu, d, lambda, meanz, mucov, mueff, n, pc, ps, sigma, Population::size(), theVector, w, x, xPrime, and Z.

Referenced by CMASearch::run().


Member Data Documentation

Array<double> CMA::B [protected]

Definition at line 125 of file CMA.h.

Referenced by create(), init(), and updateStrategyParameters().

Array<double> CMA::C [protected]

Definition at line 122 of file CMA.h.

Referenced by getC(), init(), and updateStrategyParameters().

double CMA::cc [protected]

Definition at line 106 of file CMA.h.

Referenced by init(), and updateStrategyParameters().

double CMA::ccov [protected]

Definition at line 110 of file CMA.h.

Referenced by init(), and updateStrategyParameters().

double CMA::ccu [protected]

Definition at line 109 of file CMA.h.

Referenced by init(), and updateStrategyParameters().

double CMA::chi_n [protected]

Definition at line 105 of file CMA.h.

Referenced by init(), setChi_n(), and updateStrategyParameters().

double CMA::cs [protected]

Definition at line 107 of file CMA.h.

Referenced by init(), and updateStrategyParameters().

double CMA::csu [protected]

Definition at line 108 of file CMA.h.

Referenced by init(), and updateStrategyParameters().

double CMA::d [protected]

Definition at line 111 of file CMA.h.

Referenced by init(), and updateStrategyParameters().

Array<double> CMA::lambda [protected]

Definition at line 124 of file CMA.h.

Referenced by create(), getCondition(), getLambda(), init(), suggestLambda(), and updateStrategyParameters().

ChromosomeT<double> CMA::meanz [protected]

Definition at line 117 of file CMA.h.

Referenced by init(), and updateStrategyParameters().

double CMA::mucov [protected]

Definition at line 113 of file CMA.h.

Referenced by init(), and updateStrategyParameters().

double CMA::mueff [protected]

Definition at line 112 of file CMA.h.

Referenced by init(), and updateStrategyParameters().

unsigned CMA::n [protected]

Definition at line 103 of file CMA.h.

Referenced by cog(), create(), getCondition(), init(), and updateStrategyParameters().

Array<double> CMA::pc [protected]

Definition at line 120 of file CMA.h.

Referenced by init(), and updateStrategyParameters().

Array<double> CMA::ps [protected]

Definition at line 121 of file CMA.h.

Referenced by init(), and updateStrategyParameters().

double CMA::sigma [protected]

Definition at line 104 of file CMA.h.

Referenced by create(), getSigma(), init(), setSigma(), and updateStrategyParameters().

Array<double> CMA::theVector [protected]

Definition at line 127 of file CMA.h.

Referenced by init(), and updateStrategyParameters().

Array<double> CMA::w [protected]

Definition at line 126 of file CMA.h.

Referenced by cog(), init(), and updateStrategyParameters().

ChromosomeT<double> CMA::x [protected]

Definition at line 115 of file CMA.h.

Referenced by create(), init(), and updateStrategyParameters().

ChromosomeT<double> CMA::xPrime [protected]

Definition at line 116 of file CMA.h.

Referenced by init(), and updateStrategyParameters().

Array<double> CMA::Z [protected]

Definition at line 123 of file CMA.h.

Referenced by init(), and updateStrategyParameters().

Array<double> CMA::z [protected]

Definition at line 119 of file CMA.h.

Referenced by create(), and init().


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