Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
#include <itkCMAEvolutionStrategyOptimizer.h>
A Covariance Matrix Adaptation Evolution Strategy Optimizer.
Based on the work by Hansen:
Definition at line 49 of file itkCMAEvolutionStrategyOptimizer.h.
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 (void) 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 StopConditionType & | GetStopCondition () |
virtual unsigned int | GetUpdateBDPeriod () const |
virtual bool | GetUseCovarianceMatrixAdaptation () const |
virtual bool | GetUseDecayingSigma () const |
virtual double | GetValueTolerance () const |
virtual void | ResumeOptimization (void) |
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 (void) override |
virtual void | StopOptimization (void) |
Public Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer | |
virtual const char * | GetClassName () const |
const ParametersType & | GetCurrentPosition (void) const override |
virtual bool | GetMaximize () const |
virtual const ScaledCostFunctionType * | GetScaledCostFunction () |
virtual const ParametersType & | GetScaledCurrentPosition () |
bool | GetUseScales (void) const |
virtual void | InitializeScales (void) |
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 | |
typedef Array2D< double > | CovarianceMatrixType |
typedef vnl_diag_matrix< double > | EigenValueMatrixType |
typedef std::vector< MeasureIndexPairType > | MeasureContainerType |
typedef std::deque< MeasureType > | MeasureHistoryType |
typedef std::pair< MeasureType, unsigned int > | MeasureIndexPairType |
typedef std::vector< ParametersType > | ParameterContainerType |
typedef itk::Statistics::MersenneTwisterRandomVariateGenerator | RandomGeneratorType |
typedef Array< double > | RecombinationWeightsType |
Protected Member Functions | |
virtual void | AdvanceOneStep (void) |
CMAEvolutionStrategyOptimizer () | |
virtual void | FixNumericalErrors (void) |
virtual void | GenerateOffspring (void) |
virtual void | InitializeBCD (void) |
virtual void | InitializeConstants (void) |
virtual void | InitializeProgressVariables (void) |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SortCostFunctionValues (void) |
virtual bool | TestConvergence (bool firstCheck) |
virtual void | UpdateBD (void) |
virtual void | UpdateC (void) |
virtual void | UpdateConjugateEvolutionPath (void) |
virtual void | UpdateEvolutionPath (void) |
virtual void | UpdateHeaviside (void) |
virtual void | UpdateSigma (void) |
~CMAEvolutionStrategyOptimizer () override | |
Protected Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer | |
virtual void | GetScaledDerivative (const ParametersType ¶meters, DerivativeType &derivative) const |
virtual MeasureType | GetScaledValue (const ParametersType ¶meters) const |
virtual void | GetScaledValueAndDerivative (const ParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
ScaledSingleValuedNonLinearOptimizer () | |
void | SetCurrentPosition (const ParametersType ¶m) override |
virtual void | SetScaledCurrentPosition (const ParametersType ¶meters) |
~ScaledSingleValuedNonLinearOptimizer () override | |
Private Member Functions | |
CMAEvolutionStrategyOptimizer (const Self &) | |
void | operator= (const Self &) |
typedef SmartPointer< const Self > itk::CMAEvolutionStrategyOptimizer::ConstPointer |
Definition at line 57 of file itkCMAEvolutionStrategyOptimizer.h.
typedef Superclass::CostFunctionType itk::CMAEvolutionStrategyOptimizer::CostFunctionType |
Definition at line 65 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 226 of file itkCMAEvolutionStrategyOptimizer.h.
typedef Superclass::DerivativeType itk::CMAEvolutionStrategyOptimizer::DerivativeType |
Definition at line 64 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 225 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 232 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 228 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 231 of file itkCMAEvolutionStrategyOptimizer.h.
Definition at line 67 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 227 of file itkCMAEvolutionStrategyOptimizer.h.
Definition at line 63 of file itkCMAEvolutionStrategyOptimizer.h.
typedef SmartPointer< Self > itk::CMAEvolutionStrategyOptimizer::Pointer |
Definition at line 56 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 234 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 224 of file itkCMAEvolutionStrategyOptimizer.h.
typedef Superclass::ScaledCostFunctionType itk::CMAEvolutionStrategyOptimizer::ScaledCostFunctionType |
Definition at line 66 of file itkCMAEvolutionStrategyOptimizer.h.
typedef Superclass::ScalesType itk::CMAEvolutionStrategyOptimizer::ScalesType |
Definition at line 68 of file itkCMAEvolutionStrategyOptimizer.h.
Definition at line 54 of file itkCMAEvolutionStrategyOptimizer.h.
Definition at line 55 of file itkCMAEvolutionStrategyOptimizer.h.
Enumerator | |
---|---|
MetricError | |
MaximumNumberOfIterations | |
PositionToleranceMin | |
PositionToleranceMax | |
ValueTolerance | |
ZeroStepLength | |
Unknown |
Definition at line 70 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Constructor
|
inlineoverrideprotected |
Destructor
Definition at line 319 of file itkCMAEvolutionStrategyOptimizer.h.
|
private |
|
protectedvirtual |
Compute the m_CurrentPosition = m(g+1), m_CurrentValue, and m_CurrentScaledStep
|
protectedvirtual |
Some checks, to be sure no numerical errors occur
|
protectedvirtual |
GenerateOffspring: Fill m_SearchDirs, m_NormalizedSearchDirs, and m_CostFunctionValues
|
virtual |
Reimplemented from itk::ScaledSingleValuedNonLinearOptimizer.
Reimplemented in elastix::CMAEvolutionStrategy< TElastix >.
|
virtual |
Get the current iteration number:
|
virtual |
The current maximum square root eigen value
|
virtual |
The current minimum square root eigen value
|
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().
|
virtual |
The current value of sigma
|
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 106 of file itkCMAEvolutionStrategyOptimizer.h.
|
virtual |
Get the metric value at the current position
|
virtual |
|
virtual |
|
virtual |
Setting: convergence condition: the maximum number of iterations. Default: 100
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Get the stop condition of the last run
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protectedvirtual |
Initialize the covariance matrix and its eigen decomposition
|
protectedvirtual |
Compute the following constant variables:
|
protectedvirtual |
Initialize the following 'progress' variables:
Reimplemented in elastix::CMAEvolutionStrategy< TElastix >.
|
static |
|
private |
|
overrideprotected |
PrintSelf
|
virtual |
|
virtual |
Setting: the initial standard deviation used to generate offspring Recommended value: 1/3 * the expected range of the parameters Default: 1.0;
|
virtual |
Setting: the maximum deviation. It is ensured that: max_i( sigma*sqrt(C[i,i]) ) < MaximumDeviation Default: +infinity
|
virtual |
|
virtual |
Setting: the minimum deviation. It is ensured that: min_i( sigma*sqrt(C[i,i]) ) > MinimumDeviation Default: 0.0
|
virtual |
Setting: the number of parents (points for recombination, ) if set to 0, a default value is chosen: floor( populationSize / 2 ), which can be inspected after having started the optimisation. Default: 0
|
virtual |
Setting: the population size ( ); 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
|
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
|
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
|
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"
|
virtual |
Setting: the A parameter for the decaying sigma sequence. Default: 50
|
virtual |
Setting: the alpha parameter for the decaying sigma sequence. Default: 0.602
|
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
|
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()
|
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
|
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
|
protectedvirtual |
Sort the m_CostFunctionValues vector and update m_MeasureHistory
|
override |
|
virtual |
|
protectedvirtual |
Check if convergence has occured:
|
protectedvirtual |
Update the eigen decomposition and m_CurrentMaximumD/m_CurrentMinimumD
|
protectedvirtual |
Update the covariance matrix C
|
protectedvirtual |
Update m_ConjugateEvolutionPath
|
protectedvirtual |
Update m_EvolutionPath
|
protectedvirtual |
Update m_Heaviside
|
protectedvirtual |
Update the Sigma either by adaptation or using the predefined function
|
protected |
B: eigen vector matrix
Definition at line 311 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
C: covariance matrix
Definition at line 309 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 303 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 263 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
cost function values for each
Definition at line 295 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 267 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 271 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
The current iteration number
Definition at line 243 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
The current maximum square root eigen value:
Definition at line 285 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
The current minimum square root eigen value:
Definition at line 283 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 299 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 297 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
The current value of Sigma
Definition at line 280 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
The value of the cost function at the current position
Definition at line 240 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
D: sqrt(eigen values)
Definition at line 313 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Some other constants, without set/get methods These settings have default values.
Definition at line 261 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 301 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 269 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 273 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 288 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Length of the MeasureHistory deque
Definition at line 277 of file itkCMAEvolutionStrategyOptimizer.h.
|
private |
Definition at line 416 of file itkCMAEvolutionStrategyOptimizer.h.
|
private |
Definition at line 420 of file itkCMAEvolutionStrategyOptimizer.h.
|
private |
Settings that are only inspected/changed by the associated get/set member functions.
Definition at line 414 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
History of best measure values
Definition at line 306 of file itkCMAEvolutionStrategyOptimizer.h.
|
private |
Definition at line 421 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
realisations of
Definition at line 293 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 254 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 253 of file itkCMAEvolutionStrategyOptimizer.h.
|
private |
Definition at line 422 of file itkCMAEvolutionStrategyOptimizer.h.
|
private |
Definition at line 423 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
The random number generator used to generate the offspring.
Definition at line 237 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
array of
Definition at line 275 of file itkCMAEvolutionStrategyOptimizer.h.
|
private |
Definition at line 419 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 291 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 265 of file itkCMAEvolutionStrategyOptimizer.h.
|
private |
Definition at line 417 of file itkCMAEvolutionStrategyOptimizer.h.
|
private |
Definition at line 418 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Boolean that indicates whether the optimizer should stop
Definition at line 249 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
The stop condition
Definition at line 246 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Definition at line 255 of file itkCMAEvolutionStrategyOptimizer.h.
|
protected |
Settings that may be changed by the optimizer:
Definition at line 252 of file itkCMAEvolutionStrategyOptimizer.h.
|
private |
Definition at line 415 of file itkCMAEvolutionStrategyOptimizer.h.
|
private |
Definition at line 424 of file itkCMAEvolutionStrategyOptimizer.h.
Generated on 1667476801 for elastix by 1.9.4 |