ITK  4.2.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
itk::GradientDescentLineSearchOptimizerv4 Class Reference

#include <itkGradientDescentLineSearchOptimizerv4.h>

+ Inheritance diagram for itk::GradientDescentLineSearchOptimizerv4:
+ Collaboration diagram for itk::GradientDescentLineSearchOptimizerv4:

List of all members.

Public Types

typedef SmartPointer< const SelfConstPointer
typedef
itk::Function::WindowConvergenceMonitoringFunction
< double > 
ConvergenceMonitoringType
typedef Superclass::DerivativeType DerivativeType
typedef
Superclass::InternalComputationValueType 
InternalComputationValueType
typedef Superclass::MeasureType MeasureType
typedef SmartPointer< SelfPointer
typedef
GradientDescentLineSearchOptimizerv4 
Self
typedef GradientDescentOptimizerv4 Superclass
- Public Types inherited from itk::GradientDescentOptimizerv4
- Public Types inherited from itk::GradientDescentOptimizerBasev4
typedef Superclass::MetricType MetricType
typedef MetricType::Pointer MetricTypePointer
typedef std::ostringstream StopConditionDescriptionType
typedef std::string StopConditionReturnStringType
enum  StopConditionType {
  MAXIMUM_NUMBER_OF_ITERATIONS,
  COSTFUNCTION_ERROR,
  UPDATE_PARAMETERS_ERROR,
  STEP_TOO_SMALL,
  QUASI_NEWTON_STEP_ERROR,
  CONVERGENCE_CHECKER_PASSED,
  OTHER_ERROR
}
- Public Types inherited from itk::ObjectToObjectOptimizerBase
typedef
MetricType::NumberOfParametersType 
NumberOfParametersType
typedef OptimizerParameters
< double > 
ParametersType
typedef OptimizerParameters
< double > 
ScalesType
- Public Types inherited from itk::Object
- Public Types inherited from itk::LightObject

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
virtual const char * GetNameOfClass () const
virtual void SetEpsilon (InternalComputationValueType _arg)
virtual
InternalComputationValueType 
GetEpsilon ()
virtual void SetLowerLimit (InternalComputationValueType _arg)
virtual
InternalComputationValueType 
GetLowerLimit ()
virtual void SetUpperLimit (InternalComputationValueType _arg)
virtual
InternalComputationValueType 
GetUpperLimit ()
virtual void SetMaximumLineSearchIterations (unsigned int _arg)
virtual unsigned int GetMaximumLineSearchIterations ()
- Public Member Functions inherited from itk::GradientDescentOptimizerv4
virtual void EstimateLearningRate ()
virtual const
InternalComputationValueType
GetConvergenceValue ()
virtual const
InternalComputationValueType
GetLearningRate ()
virtual const
InternalComputationValueType
GetMaximumStepSizeInPhysicalUnits ()
virtual void ResumeOptimization ()
virtual void SetConvergenceWindowSize (SizeValueType _arg)
virtual void SetLearningRate (InternalComputationValueType _arg)
virtual void SetMaximumStepSizeInPhysicalUnits (InternalComputationValueType _arg)
virtual void SetMinimumConvergenceValue (InternalComputationValueType _arg)
virtual void SetScalesEstimator (OptimizerParameterScalesEstimator *_arg)
virtual void StartOptimization ()
virtual void StopOptimization (void)
virtual void SetDoEstimateScales (bool _arg)
virtual const bool & GetDoEstimateScales ()
virtual void DoEstimateScalesOn ()
virtual void DoEstimateScalesOff ()
virtual void SetDoEstimateLearningRateAtEachIteration (bool _arg)
virtual const bool & GetDoEstimateLearningRateAtEachIteration ()
virtual void DoEstimateLearningRateAtEachIterationOn ()
virtual void DoEstimateLearningRateAtEachIterationOff ()
virtual void SetDoEstimateLearningRateOnce (bool _arg)
virtual const bool & GetDoEstimateLearningRateOnce ()
virtual void DoEstimateLearningRateOnceOn ()
virtual void DoEstimateLearningRateOnceOff ()
virtual void SetReturnBestParametersAndValue (bool _arg)
virtual const bool & GetReturnBestParametersAndValue ()
virtual void ReturnBestParametersAndValueOn ()
virtual void ReturnBestParametersAndValueOff ()
- Public Member Functions inherited from itk::GradientDescentOptimizerBasev4
virtual SizeValueType GetCurrentIteration () const
virtual const DerivativeTypeGetGradient ()
virtual const SizeValueTypeGetNumberOfIterations ()
virtual const StopConditionTypeGetStopCondition ()
virtual const
StopConditionReturnStringType 
GetStopConditionDescription () const
virtual void SetNumberOfIterations (SizeValueType _arg)
virtual void ModifyGradientByScales ()
virtual void ModifyGradientByLearningRate ()
- Public Member Functions inherited from itk::ObjectToObjectOptimizerBase
virtual const MeasureTypeGetCurrentMetricValue ()
const ParametersTypeGetCurrentPosition ()
virtual const ThreadIdTypeGetNumberOfThreads ()
virtual const ScalesTypeGetScales ()
virtual const bool & GetScalesAreIdentity ()
const MeasureTypeGetValue ()
virtual void SetNumberOfThreads (ThreadIdType number)
virtual void SetScales (ScalesType _arg)
virtual MetricTypeGetMetric ()
virtual void SetMetric (MetricType *_arg)
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
unsigned long AddObserver (const EventObject &event, Command *) const
virtual void DebugOff () const
virtual void DebugOn () const
CommandGetCommand (unsigned long tag)
bool GetDebug () const
MetaDataDictionaryGetMetaDataDictionary (void)
const MetaDataDictionaryGetMetaDataDictionary (void) const
virtual unsigned long 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
virtual void Register () const
void RemoveAllObservers ()
void RemoveObserver (unsigned long tag)
void SetDebug (bool debugFlag) const
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
virtual void SetReferenceCount (int)
virtual void UnRegister () const
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
virtual int GetReferenceCount () const
 itkCloneMacro (Self)
void Print (std::ostream &os, Indent indent=0) const

Static Public Member Functions

static Pointer New ()

Protected Member Functions

virtual void AdvanceOneStep (void)
InternalComputationValueType GoldenSectionSearch (InternalComputationValueType a, InternalComputationValueType b, InternalComputationValueType c)
 GradientDescentLineSearchOptimizerv4 ()
virtual void PrintSelf (std::ostream &os, Indent indent) const
virtual ~GradientDescentLineSearchOptimizerv4 ()
- Protected Member Functions inherited from itk::GradientDescentOptimizerv4
 GradientDescentOptimizerv4 ()
virtual ~GradientDescentOptimizerv4 ()
virtual void ModifyGradientByScalesOverSubRange (const IndexRangeType &subrange)
virtual void ModifyGradientByLearningRateOverSubRange (const IndexRangeType &subrange)
- Protected Member Functions inherited from itk::GradientDescentOptimizerBasev4
 GradientDescentOptimizerBasev4 ()
virtual ~GradientDescentOptimizerBasev4 ()
- Protected Member Functions inherited from itk::ObjectToObjectOptimizerBase
 ObjectToObjectOptimizerBase ()
virtual ~ObjectToObjectOptimizerBase ()
- Protected Member Functions inherited from itk::Object
 Object ()
bool PrintObservers (std::ostream &os, Indent indent) const
virtual void SetTimeStamp (const TimeStamp &time)
virtual ~Object ()
- 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

InternalComputationValueType m_Epsilon
unsigned int m_LineSearchIterations
InternalComputationValueType m_LowerLimit
unsigned int m_MaximumLineSearchIterations
InternalComputationValueType m_Phi
InternalComputationValueType m_Resphi
InternalComputationValueType m_UpperLimit
- Protected Attributes inherited from itk::GradientDescentOptimizerv4
ParametersType m_BestParameters
ConvergenceMonitoringType::Pointer m_ConvergenceMonitoring
InternalComputationValueType m_ConvergenceValue
SizeValueType m_ConvergenceWindowSize
MeasureType m_CurrentBestValue
InternalComputationValueType m_LearningRate
InternalComputationValueType m_MaximumStepSizeInPhysicalUnits
InternalComputationValueType m_MinimumConvergenceValue
bool m_ReturnBestParametersAndValue
OptimizerParameterScalesEstimator::Pointer m_ScalesEstimator
- Protected Attributes inherited from itk::GradientDescentOptimizerBasev4
SizeValueType m_CurrentIteration
DerivativeType m_Gradient
GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader::Pointer m_ModifyGradientByLearningRateThreader
GradientDescentOptimizerBasev4ModifyGradientByScalesThreader::Pointer m_ModifyGradientByScalesThreader
SizeValueType m_NumberOfIterations
bool m_Stop
StopConditionType m_StopCondition
StopConditionDescriptionType m_StopConditionDescription
- Protected Attributes inherited from itk::ObjectToObjectOptimizerBase
MeasureType m_CurrentMetricValue
MetricTypePointer m_Metric
ThreadIdType m_NumberOfThreads
ScalesType m_Scales
bool m_ScalesAreIdentity

Private Member Functions

 GradientDescentLineSearchOptimizerv4 (const Self &)
void operator= (const Self &)

Detailed Description

Gradient descent optimizer with a golden section line search.

GradientDescentLineSearchOptimizer implements a simple gradient descent optimizer that is followed by a line search to find the best value for the learning rate. At each iteration the current position is updated according to

\[ p_{n+1} = p_n + \mbox{learningRateByGoldenSectionLineSearch} \, \frac{\partial f(p_n) }{\partial p_n} \]

Options are identical to the superclass's except for:

options Epsilon, LowerLimit and UpperLimit that will guide a golden section line search to find the optimal gradient update within the range :

[ learningRate * LowerLimit , learningRate * UpperLimit ]

where Epsilon sets the resolution of the search. Smaller values lead to additional computation time but better localization of the minimum.

By default, this optimizer will return the best value and associated parameters that were calculated during the optimization. See SetReturnBestParametersAndValue().

Definition at line 58 of file itkGradientDescentLineSearchOptimizerv4.h.


Member Typedef Documentation

Type for the convergence checker

Reimplemented from itk::GradientDescentOptimizerv4.

Reimplemented in itk::ConjugateGradientLineSearchOptimizerv4.

Definition at line 82 of file itkGradientDescentLineSearchOptimizerv4.h.

Derivative type

Reimplemented from itk::GradientDescentOptimizerv4.

Reimplemented in itk::ConjugateGradientLineSearchOptimizerv4.

Definition at line 72 of file itkGradientDescentLineSearchOptimizerv4.h.

typedef Superclass::InternalComputationValueType itk::GradientDescentLineSearchOptimizerv4::InternalComputationValueType

Internal computation type, for maintaining a desired precision

Reimplemented from itk::GradientDescentOptimizerv4.

Reimplemented in itk::ConjugateGradientLineSearchOptimizerv4.

Definition at line 79 of file itkGradientDescentLineSearchOptimizerv4.h.

Metric type over which this class is templated

Reimplemented from itk::GradientDescentOptimizerv4.

Reimplemented in itk::ConjugateGradientLineSearchOptimizerv4.

Definition at line 78 of file itkGradientDescentLineSearchOptimizerv4.h.

Standard class typedefs.

Reimplemented from itk::GradientDescentOptimizerv4.

Reimplemented in itk::ConjugateGradientLineSearchOptimizerv4.

Definition at line 63 of file itkGradientDescentLineSearchOptimizerv4.h.


Constructor & Destructor Documentation

itk::GradientDescentLineSearchOptimizerv4::GradientDescentLineSearchOptimizerv4 ( )
protected

Default constructor

virtual itk::GradientDescentLineSearchOptimizerv4::~GradientDescentLineSearchOptimizerv4 ( )
protectedvirtual

Destructor

itk::GradientDescentLineSearchOptimizerv4::GradientDescentLineSearchOptimizerv4 ( const Self )
private

Member Function Documentation

virtual void itk::GradientDescentLineSearchOptimizerv4::AdvanceOneStep ( void  )
protectedvirtual

Advance one Step following the gradient direction. Includes transform update.

Reimplemented from itk::GradientDescentOptimizerv4.

Reimplemented in itk::ConjugateGradientLineSearchOptimizerv4.

virtual::itk::LightObject::Pointer itk::GradientDescentLineSearchOptimizerv4::CreateAnother ( void  ) const
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::GradientDescentOptimizerv4.

Reimplemented in itk::ConjugateGradientLineSearchOptimizerv4.

virtual InternalComputationValueType itk::GradientDescentLineSearchOptimizerv4::GetEpsilon ( )
virtual

The epsilon determines the accuracy of the line search i.e. the energy alteration that is considered convergent.

virtual InternalComputationValueType itk::GradientDescentLineSearchOptimizerv4::GetLowerLimit ( )
virtual

The upper and lower limit below determine the range of values over which the learning rate can be adjusted by the golden section line search. The update can then occur in the range from the smallest change given by : NewParams = OldParams + LowerLimit * gradient to the largest change given by : NewParams = OldParams + UpperLimit * gradient Reasonable values might be 0 and 2.

virtual unsigned int itk::GradientDescentLineSearchOptimizerv4::GetMaximumLineSearchIterations ( )
virtual

The upper and lower limit below determine the range of values over which the learning rate can be adjusted by the golden section line search. The update can then occur in the range from the smallest change given by : NewParams = OldParams + LowerLimit * gradient to the largest change given by : NewParams = OldParams + UpperLimit * gradient Reasonable values might be 0 and 2.

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

Run-time type information (and related methods).

Reimplemented from itk::GradientDescentOptimizerv4.

Reimplemented in itk::ConjugateGradientLineSearchOptimizerv4.

virtual InternalComputationValueType itk::GradientDescentLineSearchOptimizerv4::GetUpperLimit ( )
virtual

The upper and lower limit below determine the range of values over which the learning rate can be adjusted by the golden section line search. The update can then occur in the range from the smallest change given by : NewParams = OldParams + LowerLimit * gradient to the largest change given by : NewParams = OldParams + UpperLimit * gradient Reasonable values might be 0 and 2.

InternalComputationValueType itk::GradientDescentLineSearchOptimizerv4::GoldenSectionSearch ( InternalComputationValueType  a,
InternalComputationValueType  b,
InternalComputationValueType  c 
)
protected
static Pointer itk::GradientDescentLineSearchOptimizerv4::New ( )
static

New macro for creation of through a Smart Pointer

Reimplemented from itk::GradientDescentOptimizerv4.

Reimplemented in itk::ConjugateGradientLineSearchOptimizerv4.

void itk::GradientDescentLineSearchOptimizerv4::operator= ( const Self )
private

Mutex lock to protect modification to the reference count

Reimplemented from itk::GradientDescentOptimizerv4.

Reimplemented in itk::ConjugateGradientLineSearchOptimizerv4.

virtual void itk::GradientDescentLineSearchOptimizerv4::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protectedvirtual

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::GradientDescentOptimizerv4.

Reimplemented in itk::ConjugateGradientLineSearchOptimizerv4.

virtual void itk::GradientDescentLineSearchOptimizerv4::SetEpsilon ( InternalComputationValueType  _arg)
virtual

The epsilon determines the accuracy of the line search i.e. the energy alteration that is considered convergent.

virtual void itk::GradientDescentLineSearchOptimizerv4::SetLowerLimit ( InternalComputationValueType  _arg)
virtual

The upper and lower limit below determine the range of values over which the learning rate can be adjusted by the golden section line search. The update can then occur in the range from the smallest change given by : NewParams = OldParams + LowerLimit * gradient to the largest change given by : NewParams = OldParams + UpperLimit * gradient Reasonable values might be 0 and 2.

virtual void itk::GradientDescentLineSearchOptimizerv4::SetMaximumLineSearchIterations ( unsigned int  _arg)
virtual

The upper and lower limit below determine the range of values over which the learning rate can be adjusted by the golden section line search. The update can then occur in the range from the smallest change given by : NewParams = OldParams + LowerLimit * gradient to the largest change given by : NewParams = OldParams + UpperLimit * gradient Reasonable values might be 0 and 2.

virtual void itk::GradientDescentLineSearchOptimizerv4::SetUpperLimit ( InternalComputationValueType  _arg)
virtual

The upper and lower limit below determine the range of values over which the learning rate can be adjusted by the golden section line search. The update can then occur in the range from the smallest change given by : NewParams = OldParams + LowerLimit * gradient to the largest change given by : NewParams = OldParams + UpperLimit * gradient Reasonable values might be 0 and 2.


Member Data Documentation

InternalComputationValueType itk::GradientDescentLineSearchOptimizerv4::m_Epsilon
protected

Definition at line 128 of file itkGradientDescentLineSearchOptimizerv4.h.

unsigned int itk::GradientDescentLineSearchOptimizerv4::m_LineSearchIterations
protected

Counts the recursion depth for the golden section search

Definition at line 134 of file itkGradientDescentLineSearchOptimizerv4.h.

InternalComputationValueType itk::GradientDescentLineSearchOptimizerv4::m_LowerLimit
protected

Definition at line 124 of file itkGradientDescentLineSearchOptimizerv4.h.

unsigned int itk::GradientDescentLineSearchOptimizerv4::m_MaximumLineSearchIterations
protected

Controls the maximum recursion depth for the golden section search

Definition at line 131 of file itkGradientDescentLineSearchOptimizerv4.h.

InternalComputationValueType itk::GradientDescentLineSearchOptimizerv4::m_Phi
protected

Definition at line 126 of file itkGradientDescentLineSearchOptimizerv4.h.

InternalComputationValueType itk::GradientDescentLineSearchOptimizerv4::m_Resphi
protected

Definition at line 127 of file itkGradientDescentLineSearchOptimizerv4.h.

InternalComputationValueType itk::GradientDescentLineSearchOptimizerv4::m_UpperLimit
protected

Definition at line 125 of file itkGradientDescentLineSearchOptimizerv4.h.


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