ITK
5.2.0
Insight Toolkit
|
#include <itkParticleSwarmOptimizer.h>
Static Public Member Functions | |
static Pointer | New () |
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 () |
ParametersType::ValueType | m_InertiaCoefficient |
ParametersType::ValueType | m_PersonalCoefficient |
ParametersType::ValueType | m_GlobalCoefficient |
virtual void | SetInertiaCoefficient (double _arg) |
virtual double | GetInertiaCoefficient () |
virtual void | SetPersonalCoefficient (double _arg) |
virtual double | GetPersonalCoefficient () |
virtual void | SetGlobalCoefficient (double _arg) |
virtual double | GetGlobalCoefficient () |
ParticleSwarmOptimizer () | |
~ParticleSwarmOptimizer () override | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
void | UpdateSwarm () override |
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 uses a stochastic optimization approach. Optimization is performed by maintaining a swarm (flock) 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. A particle's next location is determined by its current location, its current speed, the location of the best function value it previously encountered, and the location of the best function value the particles in its neighborhood previously encountered. In this implementation we use a global neighborhood with the following update equations:
where are and are user selected weights.
Swarm initialization is performed within the user supplied parameter bounds using 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 generations is below a threshold and the swarm has collapsed (i.e. particles are close to each other in parameter space).
NOTE: This implementation only performs minimization.
Definition at line 60 of file itkParticleSwarmOptimizer.h.
using itk::ParticleSwarmOptimizer::ConstPointer = SmartPointer<const Self> |
Definition at line 69 of file itkParticleSwarmOptimizer.h.
Definition at line 68 of file itkParticleSwarmOptimizer.h.
Standard "Self" type alias.
Definition at line 66 of file itkParticleSwarmOptimizer.h.
Definition at line 67 of file itkParticleSwarmOptimizer.h.
|
protected |
The Particle swarm optimizer uses the following update formula: v_i(t+1) = w*v_i(t) + c_1*uniform(0,1)*(p_i-x_i(t)) + c_2*uniform(0,1)*(p_g-x_i(t)) x_i(t+1) = clampToBounds(x_i(t) + v_i(t+1)) where w - inertia constant c_1 - personal coefficient c_2 - global coefficient p_i - parameters yielding the best function value obtained by this particle p_g - parameters yielding the best function value obtained by all particles
|
overrideprotected |
The Particle swarm optimizer uses the following update formula: v_i(t+1) = w*v_i(t) + c_1*uniform(0,1)*(p_i-x_i(t)) + c_2*uniform(0,1)*(p_g-x_i(t)) x_i(t+1) = clampToBounds(x_i(t) + v_i(t+1)) where w - inertia constant c_1 - personal coefficient c_2 - global coefficient p_i - parameters yielding the best function value obtained by this particle p_g - parameters yielding the best function value obtained by all particles
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::NonLinearOptimizer.
|
virtual |
The Particle swarm optimizer uses the following update formula: v_i(t+1) = w*v_i(t) + c_1*uniform(0,1)*(p_i-x_i(t)) + c_2*uniform(0,1)*(p_g-x_i(t)) x_i(t+1) = clampToBounds(x_i(t) + v_i(t+1)) where w - inertia constant c_1 - personal coefficient c_2 - global coefficient p_i - parameters yielding the best function value obtained by this particle p_g - parameters yielding the best function value obtained by all particles
|
virtual |
The Particle swarm optimizer uses the following update formula: v_i(t+1) = w*v_i(t) + c_1*uniform(0,1)*(p_i-x_i(t)) + c_2*uniform(0,1)*(p_g-x_i(t)) x_i(t+1) = clampToBounds(x_i(t) + v_i(t+1)) where w - inertia constant c_1 - personal coefficient c_2 - global coefficient p_i - parameters yielding the best function value obtained by this particle p_g - parameters yielding the best function value obtained by all particles
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::ParticleSwarmOptimizerBase.
|
virtual |
The Particle swarm optimizer uses the following update formula: v_i(t+1) = w*v_i(t) + c_1*uniform(0,1)*(p_i-x_i(t)) + c_2*uniform(0,1)*(p_g-x_i(t)) x_i(t+1) = clampToBounds(x_i(t) + v_i(t+1)) where w - inertia constant c_1 - personal coefficient c_2 - global coefficient p_i - parameters yielding the best function value obtained by this particle p_g - parameters yielding the best function value obtained by all particles
|
static |
Method for creation through the object factory.
|
overrideprotectedvirtual |
The Particle swarm optimizer uses the following update formula: v_i(t+1) = w*v_i(t) + c_1*uniform(0,1)*(p_i-x_i(t)) + c_2*uniform(0,1)*(p_g-x_i(t)) x_i(t+1) = clampToBounds(x_i(t) + v_i(t+1)) where w - inertia constant c_1 - personal coefficient c_2 - global coefficient p_i - parameters yielding the best function value obtained by this particle p_g - parameters yielding the best function value obtained by all particles
Reimplemented from itk::Optimizer.
|
virtual |
The Particle swarm optimizer uses the following update formula: v_i(t+1) = w*v_i(t) + c_1*uniform(0,1)*(p_i-x_i(t)) + c_2*uniform(0,1)*(p_g-x_i(t)) x_i(t+1) = clampToBounds(x_i(t) + v_i(t+1)) where w - inertia constant c_1 - personal coefficient c_2 - global coefficient p_i - parameters yielding the best function value obtained by this particle p_g - parameters yielding the best function value obtained by all particles
|
virtual |
The Particle swarm optimizer uses the following update formula: v_i(t+1) = w*v_i(t) + c_1*uniform(0,1)*(p_i-x_i(t)) + c_2*uniform(0,1)*(p_g-x_i(t)) x_i(t+1) = clampToBounds(x_i(t) + v_i(t+1)) where w - inertia constant c_1 - personal coefficient c_2 - global coefficient p_i - parameters yielding the best function value obtained by this particle p_g - parameters yielding the best function value obtained by all particles
|
virtual |
The Particle swarm optimizer uses the following update formula: v_i(t+1) = w*v_i(t) + c_1*uniform(0,1)*(p_i-x_i(t)) + c_2*uniform(0,1)*(p_g-x_i(t)) x_i(t+1) = clampToBounds(x_i(t) + v_i(t+1)) where w - inertia constant c_1 - personal coefficient c_2 - global coefficient p_i - parameters yielding the best function value obtained by this particle p_g - parameters yielding the best function value obtained by all particles
|
overrideprotectedvirtual |
The Particle swarm optimizer uses the following update formula: v_i(t+1) = w*v_i(t) + c_1*uniform(0,1)*(p_i-x_i(t)) + c_2*uniform(0,1)*(p_g-x_i(t)) x_i(t+1) = clampToBounds(x_i(t) + v_i(t+1)) where w - inertia constant c_1 - personal coefficient c_2 - global coefficient p_i - parameters yielding the best function value obtained by this particle p_g - parameters yielding the best function value obtained by all particles
Implements itk::ParticleSwarmOptimizerBase.
|
private |
The Particle swarm optimizer uses the following update formula: v_i(t+1) = w*v_i(t) + c_1*uniform(0,1)*(p_i-x_i(t)) + c_2*uniform(0,1)*(p_g-x_i(t)) x_i(t+1) = clampToBounds(x_i(t) + v_i(t+1)) where w - inertia constant c_1 - personal coefficient c_2 - global coefficient p_i - parameters yielding the best function value obtained by this particle p_g - parameters yielding the best function value obtained by all particles
Definition at line 108 of file itkParticleSwarmOptimizer.h.
|
private |
The Particle swarm optimizer uses the following update formula: v_i(t+1) = w*v_i(t) + c_1*uniform(0,1)*(p_i-x_i(t)) + c_2*uniform(0,1)*(p_g-x_i(t)) x_i(t+1) = clampToBounds(x_i(t) + v_i(t+1)) where w - inertia constant c_1 - personal coefficient c_2 - global coefficient p_i - parameters yielding the best function value obtained by this particle p_g - parameters yielding the best function value obtained by all particles
Definition at line 106 of file itkParticleSwarmOptimizer.h.
|
private |
The Particle swarm optimizer uses the following update formula: v_i(t+1) = w*v_i(t) + c_1*uniform(0,1)*(p_i-x_i(t)) + c_2*uniform(0,1)*(p_g-x_i(t)) x_i(t+1) = clampToBounds(x_i(t) + v_i(t+1)) where w - inertia constant c_1 - personal coefficient c_2 - global coefficient p_i - parameters yielding the best function value obtained by this particle p_g - parameters yielding the best function value obtained by all particles
Definition at line 107 of file itkParticleSwarmOptimizer.h.