ITK  5.2.0
Insight Toolkit
Classes | Public Types | Public Member Functions | List of all members

#include <itkParticleSwarmOptimizerBase.h>

+ Inheritance diagram for itk::ParticleSwarmOptimizerBase:
+ Collaboration diagram for itk::ParticleSwarmOptimizerBase:

Classes

struct  ParticleData
 

Public Types

using ConstPointer = SmartPointer< const Self >
 
using MeasureType = CostFunctionType::MeasureType
 
using NumberOfGenerationsType = unsigned int
 
using NumberOfIterationsType = unsigned int
 
using NumberOfParticlesType = unsigned int
 
using ParameterBoundsType = std::vector< std::pair< ParametersType::ValueType, ParametersType::ValueType > >
 
using Pointer = SmartPointer< Self >
 
using RandomVariateGeneratorType = Statistics::MersenneTwisterRandomVariateGenerator
 
using Self = ParticleSwarmOptimizerBase
 
using Superclass = SingleValuedNonLinearOptimizer
 
using SwarmType = std::vector< ParticleData >
 
using ValueType = ParametersType::ValueType
 
- Public Types inherited from itk::SingleValuedNonLinearOptimizer
using ConstPointer = SmartPointer< const Self >
 
using CostFunctionPointer = CostFunctionType::Pointer
 
using CostFunctionType = SingleValuedCostFunction
 
using DerivativeType = CostFunctionType::DerivativeType
 
using MeasureType = CostFunctionType::MeasureType
 
using ParametersType = Superclass::ParametersType
 
using Pointer = SmartPointer< Self >
 
using Self = SingleValuedNonLinearOptimizer
 
using Superclass = NonLinearOptimizer
 
- Public Types inherited from itk::NonLinearOptimizer
using ConstPointer = SmartPointer< const Self >
 
using ParametersType = Superclass::ParametersType
 
using Pointer = SmartPointer< Self >
 
using ScalesType = Superclass::ScalesType
 
using Self = NonLinearOptimizer
 
using Superclass = Optimizer
 
- Public Types inherited from itk::Optimizer
using ConstPointer = SmartPointer< const Self >
 
using ParametersType = OptimizerParameters< double >
 
using Pointer = SmartPointer< Self >
 
using ScalesType = Array< double >
 
using Self = Optimizer
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual const char * GetNameOfClass () const
 
- Public Member Functions inherited from itk::SingleValuedNonLinearOptimizer
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const CostFunctionTypeGetCostFunction () const
 
virtual CostFunctionTypeGetModifiableCostFunction ()
 
MeasureType GetValue (const ParametersType &parameters) const
 
virtual void SetCostFunction (CostFunctionType *costFunction)
 
- Public Member Functions inherited from itk::Optimizer
virtual const ParametersTypeGetInitialPosition () const
 
virtual void SetInitialPosition (const ParametersType &param)
 
void SetScales (const ScalesType &scales)
 
virtual const ScalesTypeGetScales () const
 
virtual const ScalesTypeGetInverseScales () const
 
virtual const ParametersTypeGetCurrentPosition () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 
bool m_PrintSwarm
 
std::ostringstream m_StopConditionDescription
 
bool m_InitializeNormalDistribution
 
NumberOfParticlesType m_NumberOfParticles
 
NumberOfIterationsType m_MaximalNumberOfIterations
 
NumberOfGenerationsType m_NumberOfGenerationsWithMinimalImprovement
 
ParameterBoundsType m_ParameterBounds
 
ParametersType m_ParametersConvergenceTolerance
 
double m_PercentageParticlesConverged
 
CostFunctionType::MeasureType m_FunctionConvergenceTolerance
 
std::vector< ParticleDatam_Particles
 
CostFunctionType::MeasureType m_FunctionBestValue { 0 }
 
std::vector< MeasureTypem_FunctionBestValueMemory
 
ParametersType m_ParametersBestValue
 
NumberOfIterationsType m_IterationIndex { 0 }
 
RandomVariateGeneratorType::IntegerType m_Seed
 
bool m_UseSeed
 
virtual void SetInitializeNormalDistribution (bool _arg)
 
virtual bool GetInitializeNormalDistribution ()
 
virtual void InitializeNormalDistributionOn ()
 
virtual void InitializeNormalDistributionOff ()
 
void SetInitialSwarm (const SwarmType &initialSwarm)
 
void ClearSwarm ()
 
virtual void SetPrintSwarm (bool _arg)
 
virtual bool GetPrintSwarm ()
 
virtual void PrintSwarmOn ()
 
virtual void PrintSwarmOff ()
 
void StartOptimization () override
 
void SetNumberOfParticles (NumberOfParticlesType n)
 
virtual NumberOfParticlesType GetNumberOfParticles ()
 
virtual void SetMaximalNumberOfIterations (NumberOfIterationsType _arg)
 
virtual NumberOfIterationsType GetMaximalNumberOfIterations ()
 
virtual void SetNumberOfGenerationsWithMinimalImprovement (NumberOfGenerationsType _arg)
 
virtual NumberOfGenerationsType GetNumberOfGenerationsWithMinimalImprovement ()
 
virtual void SetParameterBounds (ParameterBoundsType &bounds)
 
void SetParameterBounds (std::pair< ParametersType::ValueType, ParametersType::ValueType > &bounds, unsigned int n)
 
ParameterBoundsType GetParameterBounds () const
 
virtual void SetFunctionConvergenceTolerance (MeasureType _arg)
 
virtual MeasureType GetFunctionConvergenceTolerance ()
 
void SetParametersConvergenceTolerance (ValueType convergenceTolerance, unsigned int sz)
 
virtual void SetParametersConvergenceTolerance (ParametersType _arg)
 
virtual ParametersType GetParametersConvergenceTolerance ()
 
virtual double GetPercentageParticlesConverged ()
 
virtual void SetPercentageParticlesConverged (double _arg)
 
virtual void SetSeed (RandomVariateGeneratorType::IntegerType _arg)
 
virtual RandomVariateGeneratorType::IntegerType GetSeed ()
 
virtual void SetUseSeed (bool _arg)
 
virtual bool GetUseSeed ()
 
virtual void UseSeedOn ()
 
virtual void UseSeedOff ()
 
MeasureType GetValue () const
 
const std::string GetStopConditionDescription () const override
 
void PrintSwarm (std::ostream &os, Indent indent) const
 
 ParticleSwarmOptimizerBase ()
 
 ~ParticleSwarmOptimizerBase () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void PrintParamtersType (const ParametersType &x, std::ostream &os) const
 
virtual void UpdateSwarm ()=0
 
virtual void ValidateSettings ()
 
virtual void Initialize ()
 
void RandomInitialization ()
 
void FileInitialization ()
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::SingleValuedNonLinearOptimizer
static Pointer New ()
 
- Static Public Member Functions inherited from itk::NonLinearOptimizer
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Optimizer
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Member Functions inherited from itk::SingleValuedNonLinearOptimizer
void PrintSelf (std::ostream &os, Indent indent) const override
 
 SingleValuedNonLinearOptimizer ()
 
 ~SingleValuedNonLinearOptimizer () override=default
 
- Protected Member Functions inherited from itk::NonLinearOptimizer
 NonLinearOptimizer ()=default
 
 ~NonLinearOptimizer () override
 
- Protected Member Functions inherited from itk::Optimizer
 Optimizer ()
 
 ~Optimizer () override=default
 
virtual void SetCurrentPosition (const ParametersType &param)
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 
- Protected Attributes inherited from itk::SingleValuedNonLinearOptimizer
CostFunctionPointer m_CostFunction
 
- Protected Attributes inherited from itk::Optimizer
bool m_ScalesInitialized { false }
 
ParametersType m_CurrentPosition
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

Abstract implementation of a Particle Swarm Optimization (PSO) algorithm.

The PSO algorithm was originally presented in:
J. Kennedy, R. Eberhart, "Particle Swarm Optimization", Proc. IEEE Int. Neural Networks, 1995.

The algorithm is a stochastic global search optimization approach. Optimization is performed by maintaining a swarm of particles that traverse the parameter space, searching for the optimal function value. Associated with each particle are its location and speed, in parameter space.

Swarm initialization is performed within the user supplied parameter bounds using either a uniform distribution or a normal distribution centered on the initial parameter values supplied by the user. The search terminates when the maximal number of iterations has been reached or when the change in the best value in the past $g$ generations is below a threshold and the swarm has collapsed (i.e. best personal particle locations are close to the swarm's best location in parameter space).

The actual optimization procedure, updating the swarm, is performed in the subclasses, required to implement the UpdateSwarm() method.

NOTE: This implementation only performs minimization.

Definition at line 56 of file itkParticleSwarmOptimizerBase.h.

Member Typedef Documentation

◆ ConstPointer

Definition at line 65 of file itkParticleSwarmOptimizerBase.h.

◆ MeasureType

Definition at line 85 of file itkParticleSwarmOptimizerBase.h.

◆ NumberOfGenerationsType

Definition at line 84 of file itkParticleSwarmOptimizerBase.h.

◆ NumberOfIterationsType

Definition at line 82 of file itkParticleSwarmOptimizerBase.h.

◆ NumberOfParticlesType

Definition at line 83 of file itkParticleSwarmOptimizerBase.h.

◆ ParameterBoundsType

◆ Pointer

Definition at line 64 of file itkParticleSwarmOptimizerBase.h.

◆ RandomVariateGeneratorType

Definition at line 87 of file itkParticleSwarmOptimizerBase.h.

◆ Self

Standard "Self" type alias.

Definition at line 62 of file itkParticleSwarmOptimizerBase.h.

◆ Superclass

Definition at line 63 of file itkParticleSwarmOptimizerBase.h.

◆ SwarmType

Definition at line 81 of file itkParticleSwarmOptimizerBase.h.

◆ ValueType

Definition at line 86 of file itkParticleSwarmOptimizerBase.h.

Constructor & Destructor Documentation

◆ ParticleSwarmOptimizerBase()

itk::ParticleSwarmOptimizerBase::ParticleSwarmOptimizerBase ( )
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ ~ParticleSwarmOptimizerBase()

itk::ParticleSwarmOptimizerBase::~ParticleSwarmOptimizerBase ( )
overrideprotected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Member Function Documentation

◆ ClearSwarm()

void itk::ParticleSwarmOptimizerBase::ClearSwarm ( )

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ FileInitialization()

void itk::ParticleSwarmOptimizerBase::FileInitialization ( )
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ GetFunctionConvergenceTolerance()

virtual MeasureType itk::ParticleSwarmOptimizerBase::GetFunctionConvergenceTolerance ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ GetInitializeNormalDistribution()

virtual bool itk::ParticleSwarmOptimizerBase::GetInitializeNormalDistribution ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ GetMaximalNumberOfIterations()

virtual NumberOfIterationsType itk::ParticleSwarmOptimizerBase::GetMaximalNumberOfIterations ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ GetNameOfClass()

virtual const char* itk::ParticleSwarmOptimizerBase::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::InitializationBiasedParticleSwarmOptimizer, and itk::ParticleSwarmOptimizer.

◆ GetNumberOfGenerationsWithMinimalImprovement()

virtual NumberOfGenerationsType itk::ParticleSwarmOptimizerBase::GetNumberOfGenerationsWithMinimalImprovement ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ GetNumberOfParticles()

virtual NumberOfParticlesType itk::ParticleSwarmOptimizerBase::GetNumberOfParticles ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ GetParameterBounds()

ParameterBoundsType itk::ParticleSwarmOptimizerBase::GetParameterBounds ( ) const

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ GetParametersConvergenceTolerance()

virtual ParametersType itk::ParticleSwarmOptimizerBase::GetParametersConvergenceTolerance ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ GetPercentageParticlesConverged()

virtual double itk::ParticleSwarmOptimizerBase::GetPercentageParticlesConverged ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ GetPrintSwarm()

virtual bool itk::ParticleSwarmOptimizerBase::GetPrintSwarm ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ GetSeed()

virtual RandomVariateGeneratorType::IntegerType itk::ParticleSwarmOptimizerBase::GetSeed ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ GetStopConditionDescription()

const std::string itk::ParticleSwarmOptimizerBase::GetStopConditionDescription ( ) const
overridevirtual

Get the reason for termination

Reimplemented from itk::Optimizer.

◆ GetUseSeed()

virtual bool itk::ParticleSwarmOptimizerBase::GetUseSeed ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ GetValue()

MeasureType itk::ParticleSwarmOptimizerBase::GetValue ( ) const

Get the function value for the current position. NOTE: This value is only valid during and after the execution of the StartOptimization() method.

◆ Initialize()

virtual void itk::ParticleSwarmOptimizerBase::Initialize ( )
protectedvirtual

Initialize the particle swarm, and seed the random number generator.

◆ InitializeNormalDistributionOff()

virtual void itk::ParticleSwarmOptimizerBase::InitializeNormalDistributionOff ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ InitializeNormalDistributionOn()

virtual void itk::ParticleSwarmOptimizerBase::InitializeNormalDistributionOn ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ PrintParamtersType()

void itk::ParticleSwarmOptimizerBase::PrintParamtersType ( const ParametersType x,
std::ostream &  os 
) const
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ PrintSelf()

void itk::ParticleSwarmOptimizerBase::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Reimplemented from itk::Optimizer.

◆ PrintSwarm()

void itk::ParticleSwarmOptimizerBase::PrintSwarm ( std::ostream &  os,
Indent  indent 
) const

Print the swarm information to the given output stream. Each line (particle data) is of the form: current_parameters current_velocity current_value best_parameters best_value

◆ PrintSwarmOff()

virtual void itk::ParticleSwarmOptimizerBase::PrintSwarmOff ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ PrintSwarmOn()

virtual void itk::ParticleSwarmOptimizerBase::PrintSwarmOn ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ RandomInitialization()

void itk::ParticleSwarmOptimizerBase::RandomInitialization ( )
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ SetFunctionConvergenceTolerance()

virtual void itk::ParticleSwarmOptimizerBase::SetFunctionConvergenceTolerance ( MeasureType  _arg)
virtual

The optimization algorithm will terminate when the function improvement in the last m_NumberOfGenerationsWithMinimalImprovement generations is less than m_FunctionConvergenceTolerance and the maximal distance between particles and the best particle in each dimension is less than m_ParametersConvergenceTolerance[i] for the specified percentage of the particles. That is, we haven't improved the best function value for a while and in the parameter space most (m%) of our particles attained their best value close to the swarm's best value. NOTE: The use of different tolerances for each dimension is desired when optimizing over non-commensurate parameters (e.g. rotation and translation). Alternatively, we could use ITK's parameter scaling approach. The current approach seems more intuitive.

◆ SetInitializeNormalDistribution()

virtual void itk::ParticleSwarmOptimizerBase::SetInitializeNormalDistribution ( bool  _arg)
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ SetInitialSwarm()

void itk::ParticleSwarmOptimizerBase::SetInitialSwarm ( const SwarmType initialSwarm)

Specify the initial swarm. Useful for evaluating PSO variants. If the initial swarm is set it will be used. To revert to random initialization (uniform or normal particle distributions) set using an empty swarm.

◆ SetMaximalNumberOfIterations()

virtual void itk::ParticleSwarmOptimizerBase::SetMaximalNumberOfIterations ( NumberOfIterationsType  _arg)
virtual

Set/Get maximal number of iterations - the maximal number of function evaluations is m_MaximalNumberOfIterations*m_NumberOfParticles

◆ SetNumberOfGenerationsWithMinimalImprovement()

virtual void itk::ParticleSwarmOptimizerBase::SetNumberOfGenerationsWithMinimalImprovement ( NumberOfGenerationsType  _arg)
virtual

Set/Get the number of generations to continue with minimal improvement in the function value, |f_best(g_i) - f_best(g_k)|<threshold where k <= i+NumberOfGenerationsWithMinimalImprovement Minimal value is one.

◆ SetNumberOfParticles()

void itk::ParticleSwarmOptimizerBase::SetNumberOfParticles ( NumberOfParticlesType  n)

Set/Get number of particles in the swarm - the maximal number of function evaluations is m_MaximalNumberOfIterations*m_NumberOfParticles

◆ SetParameterBounds() [1/2]

virtual void itk::ParticleSwarmOptimizerBase::SetParameterBounds ( ParameterBoundsType bounds)
virtual

Set/Get the parameter bounds. Search for optimal value is inside these bounds. NOTE: It is assumed that the first entry is the minimal value, second is the maximal value.

◆ SetParameterBounds() [2/2]

void itk::ParticleSwarmOptimizerBase::SetParameterBounds ( std::pair< ParametersType::ValueType, ParametersType::ValueType > &  bounds,
unsigned int  n 
)

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ SetParametersConvergenceTolerance() [1/2]

virtual void itk::ParticleSwarmOptimizerBase::SetParametersConvergenceTolerance ( ParametersType  _arg)
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ SetParametersConvergenceTolerance() [2/2]

void itk::ParticleSwarmOptimizerBase::SetParametersConvergenceTolerance ( ValueType  convergenceTolerance,
unsigned int  sz 
)

Set parameters convergence tolerance using the same value for all, sz, parameters

◆ SetPercentageParticlesConverged()

virtual void itk::ParticleSwarmOptimizerBase::SetPercentageParticlesConverged ( double  _arg)
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ SetPrintSwarm()

virtual void itk::ParticleSwarmOptimizerBase::SetPrintSwarm ( bool  _arg)
virtual

Indicate whether or not to output the swarm information when printing an object. By default this option is turned off as it generates too much information.

◆ SetSeed()

virtual void itk::ParticleSwarmOptimizerBase::SetSeed ( RandomVariateGeneratorType::IntegerType  _arg)
virtual

Set the random number seed for the swarm. Use this method to produce reaptible results, typically, for testing.

◆ SetUseSeed()

virtual void itk::ParticleSwarmOptimizerBase::SetUseSeed ( bool  _arg)
virtual

Use a specific seed to initialize the random number generator. If On, use m_Seed to seed the random number generator. Default is Off.

◆ StartOptimization()

void itk::ParticleSwarmOptimizerBase::StartOptimization ( )
overridevirtual

Start optimization.

Reimplemented from itk::Optimizer.

◆ UpdateSwarm()

virtual void itk::ParticleSwarmOptimizerBase::UpdateSwarm ( )
protectedpure virtual

Implement your update rule in this function.

Implemented in itk::InitializationBiasedParticleSwarmOptimizer, and itk::ParticleSwarmOptimizer.

◆ UseSeedOff()

virtual void itk::ParticleSwarmOptimizerBase::UseSeedOff ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ UseSeedOn()

virtual void itk::ParticleSwarmOptimizerBase::UseSeedOn ( )
virtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

◆ ValidateSettings()

virtual void itk::ParticleSwarmOptimizerBase::ValidateSettings ( )
protectedvirtual

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Member Data Documentation

◆ m_FunctionBestValue

CostFunctionType::MeasureType itk::ParticleSwarmOptimizerBase::m_FunctionBestValue { 0 }
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 255 of file itkParticleSwarmOptimizerBase.h.

◆ m_FunctionBestValueMemory

std::vector<MeasureType> itk::ParticleSwarmOptimizerBase::m_FunctionBestValueMemory
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 256 of file itkParticleSwarmOptimizerBase.h.

◆ m_FunctionConvergenceTolerance

CostFunctionType::MeasureType itk::ParticleSwarmOptimizerBase::m_FunctionConvergenceTolerance
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 253 of file itkParticleSwarmOptimizerBase.h.

◆ m_InitializeNormalDistribution

bool itk::ParticleSwarmOptimizerBase::m_InitializeNormalDistribution
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 246 of file itkParticleSwarmOptimizerBase.h.

◆ m_IterationIndex

NumberOfIterationsType itk::ParticleSwarmOptimizerBase::m_IterationIndex { 0 }
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 258 of file itkParticleSwarmOptimizerBase.h.

◆ m_MaximalNumberOfIterations

NumberOfIterationsType itk::ParticleSwarmOptimizerBase::m_MaximalNumberOfIterations
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 248 of file itkParticleSwarmOptimizerBase.h.

◆ m_NumberOfGenerationsWithMinimalImprovement

NumberOfGenerationsType itk::ParticleSwarmOptimizerBase::m_NumberOfGenerationsWithMinimalImprovement
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 249 of file itkParticleSwarmOptimizerBase.h.

◆ m_NumberOfParticles

NumberOfParticlesType itk::ParticleSwarmOptimizerBase::m_NumberOfParticles
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 247 of file itkParticleSwarmOptimizerBase.h.

◆ m_ParameterBounds

ParameterBoundsType itk::ParticleSwarmOptimizerBase::m_ParameterBounds
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 250 of file itkParticleSwarmOptimizerBase.h.

◆ m_ParametersBestValue

ParametersType itk::ParticleSwarmOptimizerBase::m_ParametersBestValue
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 257 of file itkParticleSwarmOptimizerBase.h.

◆ m_ParametersConvergenceTolerance

ParametersType itk::ParticleSwarmOptimizerBase::m_ParametersConvergenceTolerance
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 251 of file itkParticleSwarmOptimizerBase.h.

◆ m_Particles

std::vector<ParticleData> itk::ParticleSwarmOptimizerBase::m_Particles
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 254 of file itkParticleSwarmOptimizerBase.h.

◆ m_PercentageParticlesConverged

double itk::ParticleSwarmOptimizerBase::m_PercentageParticlesConverged
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 252 of file itkParticleSwarmOptimizerBase.h.

◆ m_PrintSwarm

bool itk::ParticleSwarmOptimizerBase::m_PrintSwarm
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 244 of file itkParticleSwarmOptimizerBase.h.

◆ m_Seed

RandomVariateGeneratorType::IntegerType itk::ParticleSwarmOptimizerBase::m_Seed
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 259 of file itkParticleSwarmOptimizerBase.h.

◆ m_StopConditionDescription

std::ostringstream itk::ParticleSwarmOptimizerBase::m_StopConditionDescription
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 245 of file itkParticleSwarmOptimizerBase.h.

◆ m_UseSeed

bool itk::ParticleSwarmOptimizerBase::m_UseSeed
protected

Specify whether to initialize the particles using a normal distribution centered on the user supplied initial value or a uniform distribution. If the optimum is expected to be near the initial value it is likely that initializing with a normal distribution will result in faster convergence.

Definition at line 260 of file itkParticleSwarmOptimizerBase.h.


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