Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
#include <itkFiniteDifferenceGradientDescentOptimizer.h>
An optimizer based on gradient descent ...
If is a costfunction that has to be minimised, the following iterative algorithm is used to find the optimal parameters x:
for all parameters .
From this equation it is clear that it a gradient descent optimizer, using a finite difference approximation of the gradient.
The gain at each iteration is defined by:
The perturbation size at each iteration is defined by:
Note the similarities to the SimultaneousPerturbation optimizer and the StandardGradientDescent optimizer.
Definition at line 55 of file itkFiniteDifferenceGradientDescentOptimizer.h.
Public Types | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef FiniteDifferenceGradientDescentOptimizer | Self |
enum | StopConditionType { MaximumNumberOfIterations , MetricError } |
typedef ScaledSingleValuedNonLinearOptimizer | Superclass |
Public Types inherited from itk::ScaledSingleValuedNonLinearOptimizer | |
typedef SmartPointer< const Self > | ConstPointer |
typedef Superclass::CostFunctionType | CostFunctionType |
typedef Superclass::DerivativeType | DerivativeType |
typedef Superclass::MeasureType | MeasureType |
typedef Superclass::ParametersType | ParametersType |
typedef SmartPointer< Self > | Pointer |
typedef ScaledCostFunctionType::Pointer | ScaledCostFunctionPointer |
typedef ScaledSingleValuedCostFunction | ScaledCostFunctionType |
typedef NonLinearOptimizer::ScalesType | ScalesType |
typedef ScaledSingleValuedNonLinearOptimizer | Self |
typedef SingleValuedNonLinearOptimizer | Superclass |
Public Member Functions | |
virtual void | AdvanceOneStep (void) |
virtual void | ComputeCurrentValueOff () |
virtual void | ComputeCurrentValueOn () |
virtual const char * | GetClassName () const |
virtual bool | GetComputeCurrentValue () const |
virtual unsigned long | GetCurrentIteration () const |
virtual double | GetGradientMagnitude () const |
virtual double | GetLearningRate () const |
virtual unsigned long | GetNumberOfIterations () const |
virtual double | GetParam_a () |
virtual double | GetParam_A () |
virtual double | GetParam_alpha () |
virtual double | GetParam_c () |
virtual double | GetParam_gamma () |
virtual StopConditionType | GetStopCondition () const |
virtual double | GetValue () const |
void | ResumeOptimization (void) |
virtual void | SetComputeCurrentValue (bool _arg) |
virtual void | SetNumberOfIterations (unsigned long _arg) |
virtual void | SetParam_a (double _arg) |
virtual void | SetParam_A (double _arg) |
virtual void | SetParam_alpha (double _arg) |
virtual void | SetParam_c (double _arg) |
virtual void | SetParam_gamma (double _arg) |
void | StartOptimization (void) override |
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 Member Functions | |
virtual double | Compute_a (unsigned long k) const |
virtual double | Compute_c (unsigned long k) const |
FiniteDifferenceGradientDescentOptimizer () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~FiniteDifferenceGradientDescentOptimizer () 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 | |
Protected Attributes | |
bool | m_ComputeCurrentValue |
DerivativeType | m_Gradient |
double | m_GradientMagnitude |
double | m_LearningRate |
Protected Attributes inherited from itk::ScaledSingleValuedNonLinearOptimizer | |
ScaledCostFunctionPointer | m_ScaledCostFunction |
ParametersType | m_ScaledCurrentPosition |
Private Member Functions | |
FiniteDifferenceGradientDescentOptimizer (const Self &) | |
void | operator= (const Self &) |
Private Attributes | |
unsigned long | m_CurrentIteration |
unsigned long | m_NumberOfIterations |
double | m_Param_a |
double | m_Param_A |
double | m_Param_alpha |
double | m_Param_c |
double | m_Param_gamma |
bool | m_Stop |
StopConditionType | m_StopCondition |
double | m_Value |
typedef SmartPointer< const Self > itk::FiniteDifferenceGradientDescentOptimizer::ConstPointer |
Definition at line 64 of file itkFiniteDifferenceGradientDescentOptimizer.h.
typedef SmartPointer< Self > itk::FiniteDifferenceGradientDescentOptimizer::Pointer |
Definition at line 63 of file itkFiniteDifferenceGradientDescentOptimizer.h.
typedef FiniteDifferenceGradientDescentOptimizer itk::FiniteDifferenceGradientDescentOptimizer::Self |
Standard class typedefs.
Definition at line 61 of file itkFiniteDifferenceGradientDescentOptimizer.h.
typedef ScaledSingleValuedNonLinearOptimizer itk::FiniteDifferenceGradientDescentOptimizer::Superclass |
Definition at line 62 of file itkFiniteDifferenceGradientDescentOptimizer.h.
Codes of stopping conditions
Enumerator | |
---|---|
MaximumNumberOfIterations | |
MetricError |
Definition at line 73 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
protected |
|
inlineoverrideprotected |
Definition at line 138 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
private |
|
virtual |
Advance one step following the gradient direction.
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
|
virtual |
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::ScaledSingleValuedNonLinearOptimizer.
Reimplemented in elastix::FiniteDifferenceGradientDescent< TElastix >.
|
virtual |
|
virtual |
Get the current iteration number.
|
virtual |
Get the CurrentStepLength, GradientMagnitude and LearningRate (a_k)
|
virtual |
|
virtual |
Get the number of iterations.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Get Stop condition.
|
virtual |
Get the current value.
|
static |
Method for creation through the object factory.
|
private |
|
overrideprotected |
PrintSelf method.
void itk::FiniteDifferenceGradientDescentOptimizer::ResumeOptimization | ( | void | ) |
Resume previously stopped optimization with current parameters
|
virtual |
|
virtual |
Set the number of iterations.
|
virtual |
Set/Get a.
|
virtual |
Set/Get A.
|
virtual |
Set/Get alpha.
|
virtual |
Set/Get c.
|
virtual |
Set/Get gamma.
|
override |
Start optimization.
void itk::FiniteDifferenceGradientDescentOptimizer::StopOptimization | ( | void | ) |
Stop optimization.
|
protected |
Boolean that says if the current value of the metric has to be computed. This is not necessary for optimisation; just nice for progress information.
Definition at line 153 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
private |
Definition at line 170 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
protected |
Definition at line 144 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
protected |
Definition at line 146 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
protected |
Definition at line 145 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
private |
Definition at line 169 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
private |
Parameters, as described by Spall.
Definition at line 173 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
private |
Definition at line 175 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
private |
Definition at line 176 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
private |
Definition at line 174 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
private |
Definition at line 177 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
private |
Private member variables.
Definition at line 166 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
private |
Definition at line 168 of file itkFiniteDifferenceGradientDescentOptimizer.h.
|
private |
Definition at line 167 of file itkFiniteDifferenceGradientDescentOptimizer.h.
Generated on 1667476801 for elastix by 1.9.4 |