Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
#include <itkStochasticPreconditionedGradientDescentOptimizer.h>
This class implements a gradient descent optimizer with a decaying gain and preconditioning.
If is a cost function that has to be minimized, the following iterative algorithm is used to find the optimal parameters :
The gain at each iteration is defined by:
.
It is very suitable to be used in combination with a stochastic estimate of the gradient . For example, in image registration problems it is often advantageous to compute the metric derivative ( ) on a new set of randomly selected image samples in each iteration. You may set the parameter NewSamplesEveryIteration
to "true"
to achieve this effect. For more information on this strategy, you may have a look at:
[1] S. Klein, M. Staring, J.P.W. Pluim, "Evaluation of Optimization Methods for Nonrigid Medical Image Registration using Mutual Information and B-Splines" IEEE Transactions on Image Processing, vol. 16 (12), December 2007.
This class also serves as a base class for other preconditioned GradientDescent type algorithms, like the AdaptiveStochasticPreconditionedGradientDescentOptimizer.
Definition at line 56 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
Public Types | |
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 Superclass::PreconditionType | PreconditionType |
typedef Superclass::PreconditionValueType | PreconditionValueType |
typedef Superclass::ScaledCostFunctionPointer | ScaledCostFunctionPointer |
typedef Superclass::ScaledCostFunctionType | ScaledCostFunctionType |
typedef Superclass::ScalesType | ScalesType |
typedef StochasticPreconditionedGradientDescentOptimizer | Self |
typedef Superclass::StopConditionType | StopConditionType |
typedef PreconditionedGradientDescentOptimizer | Superclass |
Public Types inherited from itk::PreconditionedGradientDescentOptimizer | |
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 vnl_sparse_matrix< PreconditionValueType > | PreconditionType |
typedef DerivativeType::ValueType | PreconditionValueType |
typedef Superclass::ScaledCostFunctionPointer | ScaledCostFunctionPointer |
typedef Superclass::ScaledCostFunctionType | ScaledCostFunctionType |
typedef Superclass::ScalesType | ScalesType |
typedef PreconditionedGradientDescentOptimizer | Self |
enum | StopConditionType { MaximumNumberOfIterations , MetricError , MinimumStepSize } |
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 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 | SetInitialTime (double _arg) |
virtual void | SetParam_a (double _arg) |
virtual void | SetParam_A (double _arg) |
virtual void | SetParam_alpha (double _arg) |
virtual void | StartOptimization (void) |
Public Member Functions inherited from itk::PreconditionedGradientDescentOptimizer | |
virtual void | AdvanceOneStep (void) |
const cholmod_common * | GetCholmodCommon (void) const |
const cholmod_factor * | GetCholmodFactor (void) const |
virtual const char * | GetClassName () const |
virtual double | GetConditionNumber () const |
virtual unsigned int | GetCurrentIteration () const |
virtual double | GetDiagonalWeight () const |
virtual const DerivativeType & | GetGradient () |
virtual double | GetLargestEigenValue () const |
virtual const double & | GetLearningRate () |
virtual double | GetMinimumGradientElementMagnitude () const |
virtual const unsigned long & | GetNumberOfIterations () |
virtual const DerivativeType & | GetSearchDirection () |
virtual double | GetSparsity () const |
virtual const StopConditionType & | GetStopCondition () |
virtual const double & | GetValue () |
virtual void | MetricErrorResponse (ExceptionObject &err) |
virtual void | ResumeOptimization (void) |
virtual void | SetDiagonalWeight (double _arg) |
virtual void | SetLearningRate (double _arg) |
virtual void | SetMinimumGradientElementMagnitude (double _arg) |
virtual void | SetNumberOfIterations (unsigned long _arg) |
virtual void | SetPreconditionMatrix (PreconditionType &precondition) |
virtual void | StartOptimization (void) |
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::PreconditionedGradientDescentOptimizer | |
static Pointer | New () |
Static Public Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer | |
static Pointer | New () |
Protected Attributes | |
double | m_CurrentTime |
Protected Attributes inherited from itk::PreconditionedGradientDescentOptimizer | |
cholmod_common * | m_CholmodCommon |
cholmod_factor * | m_CholmodFactor |
cholmod_sparse * | m_CholmodGradient |
double | m_ConditionNumber |
DerivativeType | m_Gradient |
double | m_LargestEigenValue |
double | m_LearningRate |
DerivativeType | m_SearchDirection |
double | m_Sparsity |
StopConditionType | m_StopCondition |
Protected Attributes inherited from itk::ScaledSingleValuedNonLinearOptimizer | |
ScaledCostFunctionPointer | m_ScaledCostFunction |
ParametersType | m_ScaledCurrentPosition |
Private Member Functions | |
void | operator= (const Self &) |
StochasticPreconditionedGradientDescentOptimizer (const Self &) | |
Private Attributes | |
double | m_InitialTime |
double | m_Param_a |
double | m_Param_A |
double | m_Param_alpha |
Additional Inherited Members | |
Protected Types inherited from itk::PreconditionedGradientDescentOptimizer | |
typedef int | CInt |
typedef SmartPointer<const Self> itk::StochasticPreconditionedGradientDescentOptimizer::ConstPointer |
Definition at line 66 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
typedef Superclass::CostFunctionType itk::StochasticPreconditionedGradientDescentOptimizer::CostFunctionType |
Definition at line 78 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
typedef Superclass::DerivativeType itk::StochasticPreconditionedGradientDescentOptimizer::DerivativeType |
Definition at line 77 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
typedef Superclass::MeasureType itk::StochasticPreconditionedGradientDescentOptimizer::MeasureType |
Typedefs inherited from the superclass.
Definition at line 75 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
typedef Superclass::ParametersType itk::StochasticPreconditionedGradientDescentOptimizer::ParametersType |
Definition at line 76 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
typedef SmartPointer<Self> itk::StochasticPreconditionedGradientDescentOptimizer::Pointer |
Definition at line 65 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
typedef Superclass::PreconditionType itk::StochasticPreconditionedGradientDescentOptimizer::PreconditionType |
Definition at line 86 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
typedef Superclass::PreconditionValueType itk::StochasticPreconditionedGradientDescentOptimizer::PreconditionValueType |
Some typedefs for computing the SelfHessian
Definition at line 85 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
typedef Superclass::ScaledCostFunctionPointer itk::StochasticPreconditionedGradientDescentOptimizer::ScaledCostFunctionPointer |
Definition at line 81 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
typedef Superclass::ScaledCostFunctionType itk::StochasticPreconditionedGradientDescentOptimizer::ScaledCostFunctionType |
Definition at line 80 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
typedef Superclass::ScalesType itk::StochasticPreconditionedGradientDescentOptimizer::ScalesType |
Definition at line 79 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
typedef StochasticPreconditionedGradientDescentOptimizer itk::StochasticPreconditionedGradientDescentOptimizer::Self |
Standard ITK.
Definition at line 62 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
typedef Superclass::StopConditionType itk::StochasticPreconditionedGradientDescentOptimizer::StopConditionType |
Definition at line 82 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
typedef PreconditionedGradientDescentOptimizer itk::StochasticPreconditionedGradientDescentOptimizer::Superclass |
Definition at line 63 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
|
protected |
|
inlineprotectedvirtual |
Definition at line 125 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
|
private |
|
virtual |
Sets a new LearningRate before calling the Superclass' implementation, and updates the current time.
Reimplemented from itk::PreconditionedGradientDescentOptimizer.
|
protectedvirtual |
Function to compute the parameter at time/iteration k.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::PreconditionedGradientDescentOptimizer.
Reimplemented in elastix::PreconditionedGradientDescent< TElastix >, and itk::AdaptiveStochasticPreconditionedGradientDescentOptimizer.
|
virtual |
Get the current time. This equals the CurrentIteration in this base class but may be different in inheriting classes, such as the AccelerateGradientDescent.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
static |
Method for creation through the object factory.
|
private |
|
virtual |
Set/Get the initial time. Should be >=0. This function is superfluous, since Param_A does effectively the same. However, in inheriting classes, like the AcceleratedGradientDescent the initial time may have a different function than Param_A. Default: 0.0
|
virtual |
Set/Get a.
|
virtual |
Set/Get A.
|
virtual |
Set/Get alpha.
|
virtual |
Set current time to 0 and call superclass' implementation.
Reimplemented from itk::PreconditionedGradientDescentOptimizer.
Reimplemented in elastix::PreconditionedGradientDescent< TElastix >.
|
protectedvirtual |
Function to update the current time This function just increments the CurrentTime by 1. Inheriting functions may implement something smarter, for example, dependent on the progress.
Reimplemented in itk::AdaptiveStochasticPreconditionedGradientDescentOptimizer.
|
protected |
The current time, which serves as input for Compute_a
Definition at line 138 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
|
private |
Settings
Definition at line 151 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
|
private |
Parameters, as described by Spall.
Definition at line 146 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
|
private |
Definition at line 147 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
|
private |
Definition at line 148 of file itkStochasticPreconditionedGradientDescentOptimizer.h.
Generated on 1667476801 for elastix by 1.9.4 |