go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itk::CMAEvolutionStrategyOptimizer Class Reference

#include <itkCMAEvolutionStrategyOptimizer.h>

Detailed Description

A Covariance Matrix Adaptation Evolution Strategy Optimizer.

Based on the work by Hansen:

  • http://www.bionik.tu-berlin.de/user/niko/
  • Hansen and Ostermeier, "Completely Derandomized Self-Adaptation in Evolution Strategies", Evolutionary Computation, 9(2), pp. 159-195 (2001).
  • See also the Matlab code, cmaes.m, which you can download from the website mentioned above.

Definition at line 49 of file itkCMAEvolutionStrategyOptimizer.h.

Inheritance diagram for itk::CMAEvolutionStrategyOptimizer:

Public Types

using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using ScaledCostFunctionType
 
using ScalesType
 
using Self = CMAEvolutionStrategyOptimizer
 
enum  StopConditionType {
  MetricError , MaximumNumberOfIterations , PositionToleranceMin , PositionToleranceMax ,
  ValueTolerance , ZeroStepLength , Unknown
}
 
using Superclass = ScaledSingleValuedNonLinearOptimizer
 
- Public Types inherited from itk::ScaledSingleValuedNonLinearOptimizer
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using ScaledCostFunctionPointer = ScaledCostFunctionType::Pointer
 
using ScaledCostFunctionType = ScaledSingleValuedCostFunction
 
using ScalesType = NonLinearOptimizer::ScalesType
 
using Self = ScaledSingleValuedNonLinearOptimizer
 
using Superclass = SingleValuedNonLinearOptimizer
 

Public Member Functions

virtual const char * GetClassName () const
 
virtual unsigned long GetCurrentIteration () const
 
virtual double GetCurrentMaximumD () const
 
virtual double GetCurrentMinimumD () const
 
virtual const ParametersType & GetCurrentScaledStep ()
 
virtual double GetCurrentSigma () const
 
virtual double GetCurrentStepLength () const
 
virtual MeasureType GetCurrentValue () const
 
virtual double GetInitialSigma () const
 
virtual double GetMaximumDeviation () const
 
virtual unsigned long GetMaximumNumberOfIterations () const
 
virtual double GetMinimumDeviation () const
 
virtual unsigned int GetNumberOfParents () const
 
virtual unsigned int GetPopulationSize () const
 
virtual double GetPositionToleranceMax () const
 
virtual double GetPositionToleranceMin () const
 
virtual const char * GetRecombinationWeightsPreset () const
 
virtual double GetSigmaDecayA () const
 
virtual double GetSigmaDecayAlpha () const
 
virtual const StopConditionTypeGetStopCondition ()
 
virtual unsigned int GetUpdateBDPeriod () const
 
virtual bool GetUseCovarianceMatrixAdaptation () const
 
virtual bool GetUseDecayingSigma () const
 
virtual double GetValueTolerance () const
 
 ITK_DISALLOW_COPY_AND_MOVE (CMAEvolutionStrategyOptimizer)
 
virtual void ResumeOptimization ()
 
virtual void SetInitialSigma (double _arg)
 
virtual void SetMaximumDeviation (double _arg)
 
virtual void SetMaximumNumberOfIterations (unsigned long _arg)
 
virtual void SetMinimumDeviation (double _arg)
 
virtual void SetNumberOfParents (unsigned int _arg)
 
virtual void SetPopulationSize (unsigned int _arg)
 
virtual void SetPositionToleranceMax (double _arg)
 
virtual void SetPositionToleranceMin (double _arg)
 
virtual void SetRecombinationWeightsPreset (const char *_arg)
 
virtual void SetSigmaDecayA (double _arg)
 
virtual void SetSigmaDecayAlpha (double _arg)
 
virtual void SetUpdateBDPeriod (unsigned int _arg)
 
virtual void SetUseCovarianceMatrixAdaptation (bool _arg)
 
virtual void SetUseDecayingSigma (bool _arg)
 
virtual void SetValueTolerance (double _arg)
 
void StartOptimization () override
 
virtual void StopOptimization ()
 
- Public Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer
const ParametersType & GetCurrentPosition () const override
 
virtual bool GetMaximize () const
 
virtual const ScaledCostFunctionTypeGetScaledCostFunction ()
 
virtual const ParametersType & GetScaledCurrentPosition ()
 
bool GetUseScales () const
 
virtual void InitializeScales ()
 
 ITK_DISALLOW_COPY_AND_MOVE (ScaledSingleValuedNonLinearOptimizer)
 
virtual void MaximizeOff ()
 
virtual void MaximizeOn ()
 
void SetCostFunction (CostFunctionType *costFunction) override
 
virtual void SetMaximize (bool _arg)
 
virtual void SetUseScales (bool arg)
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer
static Pointer New ()
 

Protected Types

using CovarianceMatrixType = vnl_matrix<double>
 
using EigenValueMatrixType = vnl_diag_matrix<double>
 
using MeasureContainerType = std::vector<MeasureIndexPairType>
 
using MeasureHistoryType = std::deque<MeasureType>
 
using MeasureIndexPairType = std::pair<MeasureType, unsigned int>
 
using ParameterContainerType = std::vector<ParametersType>
 
using RandomGeneratorType = itk::Statistics::MersenneTwisterRandomVariateGenerator
 
using RecombinationWeightsType = Array<double>
 

Protected Member Functions

virtual void AdvanceOneStep ()
 
 CMAEvolutionStrategyOptimizer ()
 
virtual void FixNumericalErrors ()
 
virtual void GenerateOffspring ()
 
virtual void InitializeBCD ()
 
virtual void InitializeConstants ()
 
virtual void InitializeProgressVariables ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SortCostFunctionValues ()
 
virtual bool TestConvergence (bool firstCheck)
 
virtual void UpdateBD ()
 
virtual void UpdateC ()
 
virtual void UpdateConjugateEvolutionPath ()
 
virtual void UpdateEvolutionPath ()
 
virtual void UpdateHeaviside ()
 
virtual void UpdateSigma ()
 
 ~CMAEvolutionStrategyOptimizer () override=default
 
- Protected Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer
virtual void GetScaledDerivative (const ParametersType &parameters, DerivativeType &derivative) const
 
virtual MeasureType GetScaledValue (const ParametersType &parameters) const
 
virtual void GetScaledValueAndDerivative (const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ScaledSingleValuedNonLinearOptimizer ()
 
void SetCurrentPosition (const ParametersType &param) override
 
virtual void SetScaledCurrentPosition (const ParametersType &parameters)
 
 ~ScaledSingleValuedNonLinearOptimizer () override=default
 

Protected Attributes

CovarianceMatrixType m_B {}
 
CovarianceMatrixType m_C {}
 
ParametersType m_ConjugateEvolutionPath {}
 
double m_ConjugateEvolutionPathConstant { 0.0 }
 
MeasureContainerType m_CostFunctionValues {}
 
double m_CovarianceMatrixAdaptationConstant { 0.0 }
 
double m_CovarianceMatrixAdaptationWeight { 0.0 }
 
unsigned long m_CurrentIteration { 0 }
 
double m_CurrentMaximumD { 1.0 }
 
double m_CurrentMinimumD { 1.0 }
 
ParametersType m_CurrentNormalizedStep {}
 
ParametersType m_CurrentScaledStep {}
 
double m_CurrentSigma { 0.0 }
 
MeasureType m_CurrentValue { 0.0 }
 
EigenValueMatrixType m_D {}
 
double m_EffectiveMu { 0.0 }
 
ParametersType m_EvolutionPath {}
 
double m_EvolutionPathConstant { 0.0 }
 
double m_ExpectationNormNormalDistribution { 0.0 }
 
bool m_Heaviside { false }
 
unsigned long m_HistoryLength { 0 }
 
MeasureHistoryType m_MeasureHistory {}
 
ParameterContainerType m_NormalizedSearchDirs {}
 
unsigned int m_NumberOfParents { 0 }
 
unsigned int m_PopulationSize { 0 }
 
RandomGeneratorType::Pointer m_RandomGenerator { RandomGeneratorType::GetInstance() }
 
RecombinationWeightsType m_RecombinationWeights {}
 
ParameterContainerType m_SearchDirs {}
 
double m_SigmaDampingConstant { 0.0 }
 
bool m_Stop { false }
 
StopConditionType m_StopCondition { Unknown }
 
unsigned int m_UpdateBDPeriod { 1 }
 
bool m_UseCovarianceMatrixAdaptation { true }
 
- Protected Attributes inherited from itk::ScaledSingleValuedNonLinearOptimizer
ScaledCostFunctionPointer m_ScaledCostFunction {}
 
ParametersType m_ScaledCurrentPosition {}
 

Private Attributes

double m_InitialSigma { 1.0 }
 
double m_MaximumDeviation { std::numeric_limits<double>::max() }
 
unsigned long m_MaximumNumberOfIterations { 100 }
 
double m_MinimumDeviation { 0.0 }
 
double m_PositionToleranceMax { 1e8 }
 
double m_PositionToleranceMin { 1e-12 }
 
std::string m_RecombinationWeightsPreset { "superlinear" }
 
double m_SigmaDecayA { 50 }
 
double m_SigmaDecayAlpha { 0.602 }
 
bool m_UseDecayingSigma { false }
 
double m_ValueTolerance { 1e-12 }
 

Member Typedef Documentation

◆ ConstPointer

Definition at line 57 of file itkCMAEvolutionStrategyOptimizer.h.

◆ CovarianceMatrixType

◆ EigenValueMatrixType

Definition at line 229 of file itkCMAEvolutionStrategyOptimizer.h.

◆ MeasureContainerType

◆ MeasureHistoryType

using itk::CMAEvolutionStrategyOptimizer::MeasureHistoryType = std::deque<MeasureType>
protected

Definition at line 232 of file itkCMAEvolutionStrategyOptimizer.h.

◆ MeasureIndexPairType

using itk::CMAEvolutionStrategyOptimizer::MeasureIndexPairType = std::pair<MeasureType, unsigned int>
protected

Definition at line 234 of file itkCMAEvolutionStrategyOptimizer.h.

◆ ParameterContainerType

using itk::CMAEvolutionStrategyOptimizer::ParameterContainerType = std::vector<ParametersType>
protected

Definition at line 231 of file itkCMAEvolutionStrategyOptimizer.h.

◆ Pointer

◆ RandomGeneratorType

using itk::CMAEvolutionStrategyOptimizer::RandomGeneratorType = itk::Statistics::MersenneTwisterRandomVariateGenerator
protected

Definition at line 237 of file itkCMAEvolutionStrategyOptimizer.h.

◆ RecombinationWeightsType

◆ ScaledCostFunctionType

◆ ScalesType

◆ Self

◆ Superclass

Member Enumeration Documentation

◆ StopConditionType

Enumerator
MetricError 
MaximumNumberOfIterations 
PositionToleranceMin 
PositionToleranceMax 
ValueTolerance 
ZeroStepLength 
Unknown 

Definition at line 69 of file itkCMAEvolutionStrategyOptimizer.h.

Constructor & Destructor Documentation

◆ CMAEvolutionStrategyOptimizer()

itk::CMAEvolutionStrategyOptimizer::CMAEvolutionStrategyOptimizer ( )
protected

Constructor

◆ ~CMAEvolutionStrategyOptimizer()

itk::CMAEvolutionStrategyOptimizer::~CMAEvolutionStrategyOptimizer ( )
overrideprotecteddefault

Destructor

Member Function Documentation

◆ AdvanceOneStep()

virtual void itk::CMAEvolutionStrategyOptimizer::AdvanceOneStep ( )
protectedvirtual

Compute the m_CurrentPosition = m(g+1), m_CurrentValue, and m_CurrentScaledStep

◆ FixNumericalErrors()

virtual void itk::CMAEvolutionStrategyOptimizer::FixNumericalErrors ( )
protectedvirtual

Some checks, to be sure no numerical errors occur

  • Adjust too low/high deviation that otherwise would violate m_MinimumDeviation or m_MaximumDeviation.
  • Adjust too low deviations that otherwise would cause numerical problems (because of finite precision of the datatypes).
  • Check if "main axis standard deviation sigma*D(i,i) has effect" (?) (just another check whether the steps are not too small)
  • Adjust step size in case of equal function values (flat fitness)
  • Adjust step size in case of equal best function values over history

◆ GenerateOffspring()

virtual void itk::CMAEvolutionStrategyOptimizer::GenerateOffspring ( )
protectedvirtual

GenerateOffspring: Fill m_SearchDirs, m_NormalizedSearchDirs, and m_CostFunctionValues

◆ GetClassName()

virtual const char * itk::CMAEvolutionStrategyOptimizer::GetClassName ( ) const
virtual

◆ GetCurrentIteration()

virtual unsigned long itk::CMAEvolutionStrategyOptimizer::GetCurrentIteration ( ) const
virtual

Get the current iteration number:

◆ GetCurrentMaximumD()

virtual double itk::CMAEvolutionStrategyOptimizer::GetCurrentMaximumD ( ) const
virtual

The current maximum square root eigen value

◆ GetCurrentMinimumD()

virtual double itk::CMAEvolutionStrategyOptimizer::GetCurrentMinimumD ( ) const
virtual

The current minimum square root eigen value

◆ GetCurrentScaledStep()

virtual const ParametersType & itk::CMAEvolutionStrategyOptimizer::GetCurrentScaledStep ( )
virtual

Get the last step taken ( scaledPos_{k+1} - scaledPos_{k} ) If you want the step taken in the space of unscaled parameters, simply use: CMAESOptimizer->GetScaledCostFunction()->ConvertScaledToUnscaledParameters( ... ) To obtain the magnitude of the step, use ->GetCurretScaledStep().magnitude().

◆ GetCurrentSigma()

virtual double itk::CMAEvolutionStrategyOptimizer::GetCurrentSigma ( ) const
virtual

The current value of sigma

◆ GetCurrentStepLength()

virtual double itk::CMAEvolutionStrategyOptimizer::GetCurrentStepLength ( ) const
inlinevirtual

This function is just for convenience, since many optimizers have such a function. It return the current sigma times the current maximumD.

Definition at line 110 of file itkCMAEvolutionStrategyOptimizer.h.

◆ GetCurrentValue()

virtual MeasureType itk::CMAEvolutionStrategyOptimizer::GetCurrentValue ( ) const
virtual

Get the metric value at the current position

◆ GetInitialSigma()

virtual double itk::CMAEvolutionStrategyOptimizer::GetInitialSigma ( ) const
virtual

◆ GetMaximumDeviation()

virtual double itk::CMAEvolutionStrategyOptimizer::GetMaximumDeviation ( ) const
virtual

◆ GetMaximumNumberOfIterations()

virtual unsigned long itk::CMAEvolutionStrategyOptimizer::GetMaximumNumberOfIterations ( ) const
virtual

Setting: convergence condition: the maximum number of iterations. Default: 100

◆ GetMinimumDeviation()

virtual double itk::CMAEvolutionStrategyOptimizer::GetMinimumDeviation ( ) const
virtual

◆ GetNumberOfParents()

virtual unsigned int itk::CMAEvolutionStrategyOptimizer::GetNumberOfParents ( ) const
virtual

◆ GetPopulationSize()

virtual unsigned int itk::CMAEvolutionStrategyOptimizer::GetPopulationSize ( ) const
virtual

◆ GetPositionToleranceMax()

virtual double itk::CMAEvolutionStrategyOptimizer::GetPositionToleranceMax ( ) const
virtual

◆ GetPositionToleranceMin()

virtual double itk::CMAEvolutionStrategyOptimizer::GetPositionToleranceMin ( ) const
virtual

◆ GetRecombinationWeightsPreset()

virtual const char * itk::CMAEvolutionStrategyOptimizer::GetRecombinationWeightsPreset ( ) const
virtual

◆ GetSigmaDecayA()

virtual double itk::CMAEvolutionStrategyOptimizer::GetSigmaDecayA ( ) const
virtual

◆ GetSigmaDecayAlpha()

virtual double itk::CMAEvolutionStrategyOptimizer::GetSigmaDecayAlpha ( ) const
virtual

◆ GetStopCondition()

virtual const StopConditionType & itk::CMAEvolutionStrategyOptimizer::GetStopCondition ( )
virtual

Get the stop condition of the last run

◆ GetUpdateBDPeriod()

virtual unsigned int itk::CMAEvolutionStrategyOptimizer::GetUpdateBDPeriod ( ) const
virtual

◆ GetUseCovarianceMatrixAdaptation()

virtual bool itk::CMAEvolutionStrategyOptimizer::GetUseCovarianceMatrixAdaptation ( ) const
virtual

◆ GetUseDecayingSigma()

virtual bool itk::CMAEvolutionStrategyOptimizer::GetUseDecayingSigma ( ) const
virtual

◆ GetValueTolerance()

virtual double itk::CMAEvolutionStrategyOptimizer::GetValueTolerance ( ) const
virtual

◆ InitializeBCD()

virtual void itk::CMAEvolutionStrategyOptimizer::InitializeBCD ( )
protectedvirtual

Initialize the covariance matrix and its eigen decomposition

◆ InitializeConstants()

virtual void itk::CMAEvolutionStrategyOptimizer::InitializeConstants ( )
protectedvirtual

Compute the following constant variables:

  • m_PopulationSize (if not provided by the user)
  • m_NumberOfParents (if not provided by the user)
  • m_RecombinationWeights
  • m_EffectiveMu
  • m_ConjugateEvolutionPathConstant
  • m_SigmaDampingConstant
  • m_CovarianceMatrixAdaptationWeight
  • m_CovarianceMatrixAdaptationConstant
  • m_UpdateBDPeriod;
  • m_UseCovarianceMatrixAdaptation;
  • m_EvolutionPathConstant
  • m_ExpectationNormNormalDistribution
  • m_HistoryLength

◆ InitializeProgressVariables()

virtual void itk::CMAEvolutionStrategyOptimizer::InitializeProgressVariables ( )
protectedvirtual

Initialize the following 'progress' variables:

  • m_CurrentSigma
  • m_Heaviside
  • m_SearchDirs
  • m_NormalizedSearchDirs
  • m_CostFunctionValues
  • m_CurrentScaledStep
  • m_CurrentNormalizedStep
  • m_EvolutionPath
  • m_ConjugateEvolutionPath
  • m_MeasureHistory
  • m_CurrentMaximumD, m_CurrentMinimumD

Reimplemented in elastix::CMAEvolutionStrategy< TElastix >.

◆ ITK_DISALLOW_COPY_AND_MOVE()

itk::CMAEvolutionStrategyOptimizer::ITK_DISALLOW_COPY_AND_MOVE ( CMAEvolutionStrategyOptimizer )

◆ New()

static Pointer itk::CMAEvolutionStrategyOptimizer::New ( )
static

◆ PrintSelf()

void itk::CMAEvolutionStrategyOptimizer::PrintSelf ( std::ostream & os,
Indent indent ) const
overrideprotected

PrintSelf

◆ ResumeOptimization()

virtual void itk::CMAEvolutionStrategyOptimizer::ResumeOptimization ( )
virtual

◆ SetInitialSigma()

virtual void itk::CMAEvolutionStrategyOptimizer::SetInitialSigma ( double _arg)
virtual

Setting: the initial standard deviation used to generate offspring Recommended value: 1/3 * the expected range of the parameters Default: 1.0;

◆ SetMaximumDeviation()

virtual void itk::CMAEvolutionStrategyOptimizer::SetMaximumDeviation ( double _arg)
virtual

Setting: the maximum deviation. It is ensured that: max_i( sigma*sqrt(C[i,i]) ) < MaximumDeviation Default: +infinity

◆ SetMaximumNumberOfIterations()

virtual void itk::CMAEvolutionStrategyOptimizer::SetMaximumNumberOfIterations ( unsigned long _arg)
virtual

◆ SetMinimumDeviation()

virtual void itk::CMAEvolutionStrategyOptimizer::SetMinimumDeviation ( double _arg)
virtual

Setting: the minimum deviation. It is ensured that: min_i( sigma*sqrt(C[i,i]) ) > MinimumDeviation Default: 0.0

◆ SetNumberOfParents()

virtual void itk::CMAEvolutionStrategyOptimizer::SetNumberOfParents ( unsigned int _arg)
virtual

Setting: the number of parents (points for recombination, $\mu$) if set to 0, a default value is chosen: floor( populationSize / 2 ), which can be inspected after having started the optimisation. Default: 0

◆ SetPopulationSize()

virtual void itk::CMAEvolutionStrategyOptimizer::SetPopulationSize ( unsigned int _arg)
virtual

Setting: the population size ( $\lambda$); if set to 0, a default value is chosen: 4 + floor( 3 ln(NumberOfParameters) ), which can be inspected after having started the optimisation. Default: 0

◆ SetPositionToleranceMax()

virtual void itk::CMAEvolutionStrategyOptimizer::SetPositionToleranceMax ( double _arg)
virtual

Setting: convergence condition: the maximum step size. 'convergence' is declared if: if ( sigma * sqrt(C[i,i]) > PositionToleranceMax*sigma0 for any i ) Default: 1e8

◆ SetPositionToleranceMin()

virtual void itk::CMAEvolutionStrategyOptimizer::SetPositionToleranceMin ( double _arg)
virtual

Setting: convergence condition: the minimum step size. convergence is declared if: if ( sigma * max( abs(p_c[i]), sqrt(C[i,i]) ) < PositionToleranceMin*sigma0 for all i ) where p_c is the evolution path Default: 1e-12

◆ SetRecombinationWeightsPreset()

virtual void itk::CMAEvolutionStrategyOptimizer::SetRecombinationWeightsPreset ( const char * _arg)
virtual

Setting: how the recombination weights are chosen: "equal", "linear" or "superlinear" are supported equal: weights = ones(mu,1); linear: weights = mu+1-(1:mu)'; superlinear: weights = log(mu+1)-log(1:mu)'; Default: "superlinear"

◆ SetSigmaDecayA()

virtual void itk::CMAEvolutionStrategyOptimizer::SetSigmaDecayA ( double _arg)
virtual

Setting: the A parameter for the decaying sigma sequence. Default: 50

◆ SetSigmaDecayAlpha()

virtual void itk::CMAEvolutionStrategyOptimizer::SetSigmaDecayAlpha ( double _arg)
virtual

Setting: the alpha parameter for the decaying sigma sequence. Default: 0.602

◆ SetUpdateBDPeriod()

virtual void itk::CMAEvolutionStrategyOptimizer::SetUpdateBDPeriod ( unsigned int _arg)
virtual

Setting: the number of iterations after which B and D are updated. If 0: a default value is computed: floor( 1.0 / c_cov / Nd / 10.0 ) This value can be inspected after calling StartOptimization

◆ SetUseCovarianceMatrixAdaptation()

virtual void itk::CMAEvolutionStrategyOptimizer::SetUseCovarianceMatrixAdaptation ( bool _arg)
virtual

Setting: whether the covariance matrix adaptation scheme should be used. Default: true. If false: CovMatrix = Identity. This parameter may be changed by the optimiser, if it sees that the adaptation rate is nearly 0 (UpdateBDPeriod >= MaxNrOfIterations). This can be inspected calling StartOptimization()

◆ SetUseDecayingSigma()

virtual void itk::CMAEvolutionStrategyOptimizer::SetUseDecayingSigma ( bool _arg)
virtual

Setting: Use a sigma that decays according to a predefined function, instead of the adaptive scheme proposed by Hansen et al. if true: currentsigma(k+1) = currentsigma(k) * (A+k)^alpha / (A+k+1)^alpha where: k = the current iteration A, alpha = user-specified parameters (see below)

Default: false

◆ SetValueTolerance()

virtual void itk::CMAEvolutionStrategyOptimizer::SetValueTolerance ( double _arg)
virtual

Setting: convergence condition: the minimum change of the cost function value over time. convergence is declared if: the range of the best cost function value measured over a period of M iterations was not greater than the valueTolerance, where: M = m_HistoryLength = min( maxnrofit, 10+ceil(3*10*N/lambda) ). Default: 1e-12

◆ SortCostFunctionValues()

virtual void itk::CMAEvolutionStrategyOptimizer::SortCostFunctionValues ( )
protectedvirtual

Sort the m_CostFunctionValues vector and update m_MeasureHistory

◆ StartOptimization()

void itk::CMAEvolutionStrategyOptimizer::StartOptimization ( )
override

◆ StopOptimization()

virtual void itk::CMAEvolutionStrategyOptimizer::StopOptimization ( )
virtual

◆ TestConvergence()

virtual bool itk::CMAEvolutionStrategyOptimizer::TestConvergence ( bool firstCheck)
protectedvirtual

Check if convergence has occurred:

  • Check if the maximum number of iterations will not be exceeded in the following iteration
  • Check if the step was not too large: if ( sigma * sqrt(C[i,i]) > PositionToleranceMax*sigma0 for any i )
  • Check for zero steplength (should never happen): if ( sigma * D[i] <= 0 for all i )
  • if firstCheck==true -> quit function
  • Check if the step was not too small: if ( sigma * max( abs(p_c[i]), sqrt(C[i,i]) ) < PositionToleranceMin*sigma0 for all i )
  • Check if the value tolerance is satisfied.

◆ UpdateBD()

virtual void itk::CMAEvolutionStrategyOptimizer::UpdateBD ( )
protectedvirtual

Update the eigen decomposition and m_CurrentMaximumD/m_CurrentMinimumD

◆ UpdateC()

virtual void itk::CMAEvolutionStrategyOptimizer::UpdateC ( )
protectedvirtual

Update the covariance matrix C

◆ UpdateConjugateEvolutionPath()

virtual void itk::CMAEvolutionStrategyOptimizer::UpdateConjugateEvolutionPath ( )
protectedvirtual

Update m_ConjugateEvolutionPath

◆ UpdateEvolutionPath()

virtual void itk::CMAEvolutionStrategyOptimizer::UpdateEvolutionPath ( )
protectedvirtual

Update m_EvolutionPath

◆ UpdateHeaviside()

virtual void itk::CMAEvolutionStrategyOptimizer::UpdateHeaviside ( )
protectedvirtual

Update m_Heaviside

◆ UpdateSigma()

virtual void itk::CMAEvolutionStrategyOptimizer::UpdateSigma ( )
protectedvirtual

Update the Sigma either by adaptation or using the predefined function

Field Documentation

◆ m_B

CovarianceMatrixType itk::CMAEvolutionStrategyOptimizer::m_B {}
protected

B: eigen vector matrix

Definition at line 314 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_C

CovarianceMatrixType itk::CMAEvolutionStrategyOptimizer::m_C {}
protected

C: covariance matrix

Definition at line 312 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_ConjugateEvolutionPath

ParametersType itk::CMAEvolutionStrategyOptimizer::m_ConjugateEvolutionPath {}
protected

$p_\sigma$

Definition at line 306 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_ConjugateEvolutionPathConstant

double itk::CMAEvolutionStrategyOptimizer::m_ConjugateEvolutionPathConstant { 0.0 }
protected

$c_{\sigma}$

Definition at line 266 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_CostFunctionValues

MeasureContainerType itk::CMAEvolutionStrategyOptimizer::m_CostFunctionValues {}
protected

cost function values for each $x_i = m + d_i$

Definition at line 298 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_CovarianceMatrixAdaptationConstant

double itk::CMAEvolutionStrategyOptimizer::m_CovarianceMatrixAdaptationConstant { 0.0 }
protected

$c_{cov}$

Definition at line 270 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_CovarianceMatrixAdaptationWeight

double itk::CMAEvolutionStrategyOptimizer::m_CovarianceMatrixAdaptationWeight { 0.0 }
protected

$\mu_{cov} = \mu_{eff}$

Definition at line 274 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_CurrentIteration

unsigned long itk::CMAEvolutionStrategyOptimizer::m_CurrentIteration { 0 }
protected

The current iteration number

Definition at line 246 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_CurrentMaximumD

double itk::CMAEvolutionStrategyOptimizer::m_CurrentMaximumD { 1.0 }
protected

The current maximum square root eigen value:

Definition at line 288 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_CurrentMinimumD

double itk::CMAEvolutionStrategyOptimizer::m_CurrentMinimumD { 1.0 }
protected

The current minimum square root eigen value:

Definition at line 286 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_CurrentNormalizedStep

ParametersType itk::CMAEvolutionStrategyOptimizer::m_CurrentNormalizedStep {}
protected

$1/\sigma * D^{-1} * B' * m_CurrentScaledStep, needed for p_{\sigma}$

Definition at line 302 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_CurrentScaledStep

ParametersType itk::CMAEvolutionStrategyOptimizer::m_CurrentScaledStep {}
protected

$m(g+1) - m(g)$

Definition at line 300 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_CurrentSigma

double itk::CMAEvolutionStrategyOptimizer::m_CurrentSigma { 0.0 }
protected

The current value of Sigma

Definition at line 283 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_CurrentValue

MeasureType itk::CMAEvolutionStrategyOptimizer::m_CurrentValue { 0.0 }
protected

The value of the cost function at the current position

Definition at line 243 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_D

EigenValueMatrixType itk::CMAEvolutionStrategyOptimizer::m_D {}
protected

D: sqrt(eigen values)

Definition at line 316 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_EffectiveMu

double itk::CMAEvolutionStrategyOptimizer::m_EffectiveMu { 0.0 }
protected

Some other constants, without set/get methods These settings have default values. $\mu_{eff}$

Definition at line 264 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_EvolutionPath

ParametersType itk::CMAEvolutionStrategyOptimizer::m_EvolutionPath {}
protected

$p_c$

Definition at line 304 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_EvolutionPathConstant

double itk::CMAEvolutionStrategyOptimizer::m_EvolutionPathConstant { 0.0 }
protected

$c_c$

Definition at line 272 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_ExpectationNormNormalDistribution

double itk::CMAEvolutionStrategyOptimizer::m_ExpectationNormNormalDistribution { 0.0 }
protected

$chiN  = E( \|N(0,I)\|$

Definition at line 276 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_Heaviside

bool itk::CMAEvolutionStrategyOptimizer::m_Heaviside { false }
protected

$h_{\sigma}$

Definition at line 291 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_HistoryLength

unsigned long itk::CMAEvolutionStrategyOptimizer::m_HistoryLength { 0 }
protected

Length of the MeasureHistory deque

Definition at line 280 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_InitialSigma

double itk::CMAEvolutionStrategyOptimizer::m_InitialSigma { 1.0 }
private

Definition at line 430 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_MaximumDeviation

double itk::CMAEvolutionStrategyOptimizer::m_MaximumDeviation { std::numeric_limits<double>::max() }
private

Definition at line 434 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_MaximumNumberOfIterations

unsigned long itk::CMAEvolutionStrategyOptimizer::m_MaximumNumberOfIterations { 100 }
private

Settings that are only inspected/changed by the associated get/set member functions.

Definition at line 428 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_MeasureHistory

MeasureHistoryType itk::CMAEvolutionStrategyOptimizer::m_MeasureHistory {}
protected

History of best measure values

Definition at line 309 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_MinimumDeviation

double itk::CMAEvolutionStrategyOptimizer::m_MinimumDeviation { 0.0 }
private

Definition at line 435 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_NormalizedSearchDirs

ParameterContainerType itk::CMAEvolutionStrategyOptimizer::m_NormalizedSearchDirs {}
protected

realisations of $N(0,I)$

Definition at line 296 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_NumberOfParents

unsigned int itk::CMAEvolutionStrategyOptimizer::m_NumberOfParents { 0 }
protected

Definition at line 257 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_PopulationSize

unsigned int itk::CMAEvolutionStrategyOptimizer::m_PopulationSize { 0 }
protected

Definition at line 256 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_PositionToleranceMax

double itk::CMAEvolutionStrategyOptimizer::m_PositionToleranceMax { 1e8 }
private

Definition at line 436 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_PositionToleranceMin

double itk::CMAEvolutionStrategyOptimizer::m_PositionToleranceMin { 1e-12 }
private

Definition at line 437 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_RandomGenerator

RandomGeneratorType::Pointer itk::CMAEvolutionStrategyOptimizer::m_RandomGenerator { RandomGeneratorType::GetInstance() }
protected

The random number generator used to generate the offspring.

Definition at line 240 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_RecombinationWeights

RecombinationWeightsType itk::CMAEvolutionStrategyOptimizer::m_RecombinationWeights {}
protected

array of $w_i$

Definition at line 278 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_RecombinationWeightsPreset

std::string itk::CMAEvolutionStrategyOptimizer::m_RecombinationWeightsPreset { "superlinear" }
private

Definition at line 433 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_SearchDirs

ParameterContainerType itk::CMAEvolutionStrategyOptimizer::m_SearchDirs {}
protected

$d_i = x_i - m$

Definition at line 294 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_SigmaDampingConstant

double itk::CMAEvolutionStrategyOptimizer::m_SigmaDampingConstant { 0.0 }
protected

$d_{\sigma}$

Definition at line 268 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_SigmaDecayA

double itk::CMAEvolutionStrategyOptimizer::m_SigmaDecayA { 50 }
private

Definition at line 431 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_SigmaDecayAlpha

double itk::CMAEvolutionStrategyOptimizer::m_SigmaDecayAlpha { 0.602 }
private

Definition at line 432 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_Stop

bool itk::CMAEvolutionStrategyOptimizer::m_Stop { false }
protected

Boolean that indicates whether the optimizer should stop

Definition at line 252 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_StopCondition

StopConditionType itk::CMAEvolutionStrategyOptimizer::m_StopCondition { Unknown }
protected

The stop condition

Definition at line 249 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_UpdateBDPeriod

unsigned int itk::CMAEvolutionStrategyOptimizer::m_UpdateBDPeriod { 1 }
protected

Definition at line 258 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_UseCovarianceMatrixAdaptation

bool itk::CMAEvolutionStrategyOptimizer::m_UseCovarianceMatrixAdaptation { true }
protected

Settings that may be changed by the optimizer:

Definition at line 255 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_UseDecayingSigma

bool itk::CMAEvolutionStrategyOptimizer::m_UseDecayingSigma { false }
private

Definition at line 429 of file itkCMAEvolutionStrategyOptimizer.h.

◆ m_ValueTolerance

double itk::CMAEvolutionStrategyOptimizer::m_ValueTolerance { 1e-12 }
private

Definition at line 438 of file itkCMAEvolutionStrategyOptimizer.h.



Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo