basic comments for adaptive normal operators
This commit is contained in:
parent
388358bc5c
commit
f5afa694bc
3 changed files with 17 additions and 10 deletions
|
|
@ -38,8 +38,9 @@ Authors:
|
||||||
#include "edoNormalAdaptive.h"
|
#include "edoNormalAdaptive.h"
|
||||||
#include "edoEstimatorAdaptive.h"
|
#include "edoEstimatorAdaptive.h"
|
||||||
|
|
||||||
|
/** An estimator that works on adaptive normal distributions, basically the heart of the CMA-ES algorithm.
|
||||||
//! edoEstimatorNormalMulti< EOT >
|
*
|
||||||
|
*/
|
||||||
template< typename EOT, typename EOD = edoNormalAdaptive<EOT> >
|
template< typename EOT, typename EOD = edoNormalAdaptive<EOT> >
|
||||||
class edoEstimatorNormalAdaptive : public edoEstimatorAdaptive< EOD >
|
class edoEstimatorNormalAdaptive : public edoEstimatorAdaptive< EOD >
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,16 @@ Authors:
|
||||||
|
|
||||||
#include <Eigen/Dense>
|
#include <Eigen/Dense>
|
||||||
|
|
||||||
|
/** A normal distribution that can be updated via several components. This is the data structure on which works the CMA-ES
|
||||||
|
* algorithm.
|
||||||
|
*
|
||||||
|
* This is *just* a data structure, the operators working on it are supposed to maintain its consistency (e.g. of the
|
||||||
|
* covariance matrix against its eigen vectors).
|
||||||
|
*
|
||||||
|
* The distribution is defined by its mean, its covariance matrix (which can be decomposed in its eigen vectors and
|
||||||
|
* values), a scaling factor (sigma) and the so-called evolution paths for the covariance and sigma.
|
||||||
|
* evolution paths.
|
||||||
|
*/
|
||||||
template < typename EOT >
|
template < typename EOT >
|
||||||
class edoNormalAdaptive : public edoDistrib< EOT >
|
class edoNormalAdaptive : public edoDistrib< EOT >
|
||||||
{
|
{
|
||||||
|
|
@ -107,11 +117,11 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned int _dim;
|
unsigned int _dim;
|
||||||
Vector _mean; //
|
Vector _mean; // mean vector
|
||||||
Matrix _C; // covariance matrix
|
Matrix _C; // covariance matrix
|
||||||
Matrix _B; // eigen vectors / coordinates system
|
Matrix _B; // eigen vectors / coordinates system
|
||||||
Vector _D; // eigen values / scaling
|
Vector _D; // eigen values / scaling
|
||||||
double _sigma; //
|
double _sigma; // absolute scaling of the distribution
|
||||||
Vector _p_c; // evolution path for C
|
Vector _p_c; // evolution path for C
|
||||||
Vector _p_s; // evolution path for sigma
|
Vector _p_s; // evolution path for sigma
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -33,12 +33,8 @@ Authors:
|
||||||
|
|
||||||
#include <edoSampler.h>
|
#include <edoSampler.h>
|
||||||
|
|
||||||
/** Sample points in a multi-normal law defined by a mean vector and a covariance matrix.
|
/** Sample points in a multi-normal law defined by a mean vector, a covariance matrix, a sigma scale factor and
|
||||||
*
|
* evolution paths. This is a step of the CMA-ES algorithm.
|
||||||
* Given M the mean vector and V the covariance matrix, of order n:
|
|
||||||
* - draw a vector T in N(0,I) (i.e. each value is drawn in a normal law with mean=0 an stddev=1)
|
|
||||||
* - compute the Cholesky decomposition L of V (i.e. such as V=LL*)
|
|
||||||
* - return X = M + LT
|
|
||||||
*/
|
*/
|
||||||
#ifdef WITH_EIGEN
|
#ifdef WITH_EIGEN
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue