Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
#include <elxStandardGradientDescent.h>
A gradient descent optimizer with a decaying gain.
This class is a wrap around the StandardGradientDescentOptimizer class. It takes care of setting parameters and printing progress information. For more information about the optimisation method, please read the documentation of the StandardGradientDescentOptimizer class.
The parameters used in this class are:
Optimizer: Select this optimizer as follows:
(Optimizer "StandardGradientDescent")
MaximumNumberOfIterations: The maximum number of iterations in each resolution.
example: (MaximumNumberOfIterations 100 100 50)
Default/recommended value: 500.
MaximumNumberOfSamplingAttempts: The maximum number of sampling attempts. Sometimes not enough corresponding samples can be drawn, upon which an exception is thrown. With this parameter it is possible to try to draw another set of samples.
example: (MaximumNumberOfSamplingAttempts 10 15 10)
Default value: 0, i.e. just fail immediately, for backward compatibility.
SP_a: The gain at each iteration is defined by
.
SP_a can be defined for each resolution.
example: (SP_a 3200.0 3200.0 1600.0)
The default value is 400.0. Tuning this variable for you specific problem is recommended.
SP_A: The gain at each iteration is defined by
.
SP_A can be defined for each resolution.
example: (SP_A 50.0 50.0 100.0)
The default/recommended value is 50.0.
SP_alpha: The gain at each iteration is defined by
.
SP_alpha can be defined for each resolution.
example: (SP_alpha 0.602 0.602 0.602)
The default/recommended value is 0.602.
Definition at line 68 of file elxStandardGradientDescent.h.
Public Member Functions | |
void | AfterEachIteration (void) override |
void | AfterEachResolution (void) override |
void | AfterRegistration (void) override |
void | BeforeEachResolution (void) override |
void | BeforeRegistration (void) override |
elxClassNameMacro ("StandardGradientDescent") | |
virtual const char * | GetClassName () const |
virtual const unsigned long & | GetMaximumNumberOfSamplingAttempts () |
void | MetricErrorResponse (itk::ExceptionObject &err) override |
void | SetCurrentPositionPublic (const ParametersType ¶m) override |
virtual void | SetMaximumNumberOfSamplingAttempts (unsigned long _arg) |
void | StartOptimization (void) override |
Public Member Functions inherited from itk::StandardGradientDescentOptimizer | |
void | AdvanceOneStep (void) override |
virtual const char * | GetClassName () const |
virtual double | GetCurrentTime () const |
virtual double | GetInitialTime () const |
virtual double | GetParam_a () const |
virtual double | GetParam_A () const |
virtual double | GetParam_alpha () const |
virtual void | ResetCurrentTimeToInitialTime (void) |
virtual void | SetInitialTime (double _arg) |
virtual void | SetParam_a (double _arg) |
virtual void | SetParam_A (double _arg) |
virtual void | SetParam_alpha (double _arg) |
void | StartOptimization (void) override |
Public Member Functions inherited from itk::GradientDescentOptimizer2 | |
virtual void | AdvanceOneStep (void) |
virtual const char * | GetClassName () const |
virtual unsigned int | GetCurrentIteration () const |
virtual const DerivativeType & | GetGradient () |
virtual const double & | GetLearningRate () |
virtual const unsigned long & | GetNumberOfIterations () |
virtual const DerivativeType & | GetSearchDirection () |
virtual const StopConditionType & | GetStopCondition () |
virtual const double & | GetValue () |
virtual void | MetricErrorResponse (ExceptionObject &err) |
virtual void | ResumeOptimization (void) |
virtual void | SetLearningRate (double _arg) |
virtual void | SetNumberOfIterations (unsigned long _arg) |
virtual void | SetUseOpenMP (bool _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) |
Public Member Functions inherited from elastix::OptimizerBase< TElastix > | |
void | AfterRegistrationBase (void) override |
void | BeforeEachResolutionBase () override |
virtual ITKBaseType * | GetAsITKBaseType (void) |
virtual const ITKBaseType * | GetAsITKBaseType (void) const |
virtual const char * | GetClassName () const |
virtual void | SetCurrentPositionPublic (const ParametersType ¶m) |
virtual void | SetSinusScales (double amplitude, double frequency, unsigned long numberOfParameters) |
Public Member Functions inherited from elastix::BaseComponentSE< TElastix > | |
ConfigurationType * | GetConfiguration (void) const |
ElastixType * | GetElastix (void) const |
RegistrationPointer | GetRegistration (void) const |
ITK_DISALLOW_COPY_AND_ASSIGN (BaseComponentSE) | |
void | SetConfiguration (ConfigurationType *_arg) |
void | SetElastix (ElastixType *_arg) |
Public Member Functions inherited from elastix::BaseComponent | |
virtual void | AfterEachIteration (void) |
virtual void | AfterEachIterationBase (void) |
virtual void | AfterEachResolution (void) |
virtual void | AfterEachResolutionBase (void) |
virtual void | AfterRegistration (void) |
virtual void | AfterRegistrationBase (void) |
virtual int | BeforeAll (void) |
virtual int | BeforeAllBase (void) |
virtual void | BeforeEachResolution (void) |
virtual void | BeforeEachResolutionBase (void) |
virtual void | BeforeRegistration (void) |
virtual void | BeforeRegistrationBase (void) |
virtual const char * | elxGetClassName (void) const |
const char * | GetComponentLabel (void) const |
ITK_DISALLOW_COPY_AND_ASSIGN (BaseComponent) | |
itkTypeMacroNoParent (BaseComponent) | |
void | SetComponentLabel (const char *label, unsigned int idx) |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::StandardGradientDescentOptimizer | |
static Pointer | New () |
Static Public Member Functions inherited from itk::GradientDescentOptimizer2 | |
static Pointer | New () |
Static Public Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer | |
static Pointer | New () |
Static Public Member Functions inherited from elastix::BaseComponent | |
static std::string | ConvertSecondsToDHMS (const double totalSeconds, const unsigned int precision) |
static void | InitializeElastixExecutable () |
static bool | IsElastixLibrary () |
Protected Member Functions | |
StandardGradientDescent () | |
~StandardGradientDescent () override | |
Protected Member Functions inherited from itk::StandardGradientDescentOptimizer | |
virtual double | Compute_a (double k) const |
StandardGradientDescentOptimizer () | |
virtual void | UpdateCurrentTime (void) |
~StandardGradientDescentOptimizer () override | |
Protected Member Functions inherited from itk::GradientDescentOptimizer2 | |
GradientDescentOptimizer2 () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~GradientDescentOptimizer2 () 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 Member Functions inherited from elastix::OptimizerBase< TElastix > | |
virtual bool | GetNewSamplesEveryIteration (void) const |
OptimizerBase () | |
virtual void | SelectNewSamples (void) |
~OptimizerBase () override | |
Protected Member Functions inherited from elastix::BaseComponentSE< TElastix > | |
BaseComponentSE ()=default | |
~BaseComponentSE () override=default | |
Protected Member Functions inherited from elastix::BaseComponent | |
BaseComponent ()=default | |
virtual | ~BaseComponent ()=default |
Private Member Functions | |
void | operator= (const Self &) |
StandardGradientDescent (const Self &) | |
Private Attributes | |
unsigned long | m_CurrentNumberOfSamplingAttempts |
unsigned long | m_MaximumNumberOfSamplingAttempts |
unsigned long | m_PreviousErrorAtIteration |
Additional Inherited Members | |
Protected Attributes inherited from itk::StandardGradientDescentOptimizer | |
double | m_CurrentTime |
bool | m_UseConstantStep |
Protected Attributes inherited from itk::GradientDescentOptimizer2 | |
unsigned long | m_CurrentIteration |
DerivativeType | m_Gradient |
double | m_LearningRate |
unsigned long | m_NumberOfIterations |
DerivativeType | m_SearchDirection |
bool | m_Stop |
StopConditionType | m_StopCondition |
double | m_Value |
Protected Attributes inherited from itk::ScaledSingleValuedNonLinearOptimizer | |
ScaledCostFunctionPointer | m_ScaledCostFunction |
ParametersType | m_ScaledCurrentPosition |
Protected Attributes inherited from elastix::BaseComponentSE< TElastix > | |
ConfigurationPointer | m_Configuration {} |
ElastixPointer | m_Elastix {} |
RegistrationPointer | m_Registration {} |
typedef Superclass2::ConfigurationPointer elastix::StandardGradientDescent< TElastix >::ConfigurationPointer |
Definition at line 104 of file elxStandardGradientDescent.h.
typedef Superclass2::ConfigurationType elastix::StandardGradientDescent< TElastix >::ConfigurationType |
Definition at line 103 of file elxStandardGradientDescent.h.
typedef itk::SmartPointer< const Self > elastix::StandardGradientDescent< TElastix >::ConstPointer |
Definition at line 81 of file elxStandardGradientDescent.h.
typedef Superclass1::CostFunctionPointer elastix::StandardGradientDescent< TElastix >::CostFunctionPointer |
Definition at line 97 of file elxStandardGradientDescent.h.
typedef Superclass1::CostFunctionType elastix::StandardGradientDescent< TElastix >::CostFunctionType |
Typedef's inherited from Superclass1, the StandardGradientDescentOptimizer.
Definition at line 96 of file elxStandardGradientDescent.h.
typedef Superclass2::ElastixPointer elastix::StandardGradientDescent< TElastix >::ElastixPointer |
Definition at line 102 of file elxStandardGradientDescent.h.
typedef Superclass2::ElastixType elastix::StandardGradientDescent< TElastix >::ElastixType |
Typedef's inherited from Superclass2, the elastix OptimizerBase .
Definition at line 101 of file elxStandardGradientDescent.h.
typedef Superclass2::ITKBaseType elastix::StandardGradientDescent< TElastix >::ITKBaseType |
Definition at line 107 of file elxStandardGradientDescent.h.
typedef Superclass1::ParametersType elastix::StandardGradientDescent< TElastix >::ParametersType |
Typedef for the ParametersType.
Definition at line 110 of file elxStandardGradientDescent.h.
typedef itk::SmartPointer< Self > elastix::StandardGradientDescent< TElastix >::Pointer |
Definition at line 80 of file elxStandardGradientDescent.h.
typedef Superclass2::RegistrationPointer elastix::StandardGradientDescent< TElastix >::RegistrationPointer |
Definition at line 106 of file elxStandardGradientDescent.h.
typedef Superclass2::RegistrationType elastix::StandardGradientDescent< TElastix >::RegistrationType |
Definition at line 105 of file elxStandardGradientDescent.h.
typedef StandardGradientDescent elastix::StandardGradientDescent< TElastix >::Self |
Standard ITK.
Definition at line 77 of file elxStandardGradientDescent.h.
typedef Superclass1::StopConditionType elastix::StandardGradientDescent< TElastix >::StopConditionType |
Definition at line 98 of file elxStandardGradientDescent.h.
typedef StandardGradientDescentOptimizer elastix::StandardGradientDescent< TElastix >::Superclass1 |
Definition at line 78 of file elxStandardGradientDescent.h.
typedef OptimizerBase< TElastix > elastix::StandardGradientDescent< TElastix >::Superclass2 |
Definition at line 79 of file elxStandardGradientDescent.h.
|
protected |
|
inlineoverrideprotected |
Definition at line 149 of file elxStandardGradientDescent.h.
|
private |
|
overridevirtual |
Reimplemented from elastix::BaseComponent.
|
overridevirtual |
Reimplemented from elastix::BaseComponent.
|
overridevirtual |
Reimplemented from elastix::BaseComponent.
|
overridevirtual |
Reimplemented from elastix::BaseComponent.
|
overridevirtual |
Methods invoked by elastix, in which parameters can be set and progress information can be printed.
Reimplemented from elastix::BaseComponent.
elastix::StandardGradientDescent< TElastix >::elxClassNameMacro | ( | "StandardGradientDescent< TElastix >" | ) |
Name of this class. Use this name in the parameter file to select this specific optimizer. example: (Optimizer "StandardGradientDescent")
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::StandardGradientDescentOptimizer.
|
virtual |
Get the MaximumNumberOfSamplingAttempts.
|
override |
Stop optimisation and pass on exception.
|
static |
Method for creation through the object factory.
|
private |
|
inlineoverride |
Add SetCurrentPositionPublic, which calls the protected SetCurrentPosition of the itkStandardGradientDescentOptimizer class.
Definition at line 134 of file elxStandardGradientDescent.h.
|
virtual |
Set the MaximumNumberOfSamplingAttempts.
|
override |
Check if any scales are set, and set the UseScales flag on or off; after that call the superclass' implementation
|
private |
Definition at line 158 of file elxStandardGradientDescent.h.
|
private |
Private variables for the sampling attempts.
Definition at line 157 of file elxStandardGradientDescent.h.
|
private |
Definition at line 159 of file elxStandardGradientDescent.h.
Generated on 1667476801 for elastix by 1.9.4 |