Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::GradientDescentOptimizer Class Reference
[NumericsOptimizers]

Implement a gradient descent optimizer. More...

#include <itkGradientDescentOptimizer.h>

Inheritance diagram for itk::GradientDescentOptimizer:

Inheritance graph
[legend]
Collaboration diagram for itk::GradientDescentOptimizer:

Collaboration graph
[legend]
List of all members.

Public Types

typedef GradientDescentOptimizer Self
typedef SingleValuedNonLinearOptimizer Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
enum  StopConditionType { MaximumNumberOfIterations, MetricError }

Public Member Functions

virtual const char * GetNameOfClass () const
virtual void AdvanceOneStep (void)
void StartOptimization (void)
void ResumeOptimization (void)
void StopOptimization (void)
virtual void SetLearningRate (double _arg)
virtual const double & GetLearningRate ()
virtual void SetNumberOfIterations (unsigned long _arg)
virtual const unsigned long & GetNumberOfIterations ()
virtual unsigned int GetCurrentIteration () const
virtual const double & GetValue ()
virtual const StopConditionTypeGetStopCondition ()
virtual const DerivativeTypeGetGradient ()
virtual const bool & GetMaximize ()
virtual void SetMaximize (bool _arg)
virtual void MaximizeOn ()
virtual void MaximizeOff ()
bool GetMinimize () const
void SetMinimize (bool v)
void MinimizeOn ()
void MinimizeOff ()

Static Public Member Functions

Pointer New ()

Protected Member Functions

 GradientDescentOptimizer ()
virtual ~GradientDescentOptimizer ()
void PrintSelf (std::ostream &os, Indent indent) const

Protected Attributes

DerivativeType m_Gradient
bool m_Maximize
double m_LearningRate

Detailed Description

Implement a gradient descent optimizer.

GradientDescentOptimizer implements a simple gradient descent optimizer. At each iteration the current position is updated according to

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

The learning rate is a fixed scalar defined via SetLearningRate(). The optimizer steps through a user defined number of iterations; no convergence checking is done.

Additionally, user can scale each component of the df / dp but setting a scaling vector using method SetScale().

See also:
RegularStepGradientDescentOptimizer

Definition at line 48 of file itkGradientDescentOptimizer.h.


Member Typedef Documentation

typedef SmartPointer<const Self> itk::GradientDescentOptimizer::ConstPointer
 

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::QuaternionRigidTransformGradientDescentOptimizer.

Definition at line 56 of file itkGradientDescentOptimizer.h.

typedef SmartPointer<Self> itk::GradientDescentOptimizer::Pointer
 

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::QuaternionRigidTransformGradientDescentOptimizer.

Definition at line 55 of file itkGradientDescentOptimizer.h.

typedef GradientDescentOptimizer itk::GradientDescentOptimizer::Self
 

Standard class typedefs.

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::QuaternionRigidTransformGradientDescentOptimizer.

Definition at line 53 of file itkGradientDescentOptimizer.h.

typedef SingleValuedNonLinearOptimizer itk::GradientDescentOptimizer::Superclass
 

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::QuaternionRigidTransformGradientDescentOptimizer.

Definition at line 54 of file itkGradientDescentOptimizer.h.


Member Enumeration Documentation

enum itk::GradientDescentOptimizer::StopConditionType
 

Codes of stopping conditions

Enumeration values:
MaximumNumberOfIterations 
MetricError 

Definition at line 66 of file itkGradientDescentOptimizer.h.


Constructor & Destructor Documentation

itk::GradientDescentOptimizer::GradientDescentOptimizer  )  [protected]
 

virtual itk::GradientDescentOptimizer::~GradientDescentOptimizer  )  [inline, protected, virtual]
 

Definition at line 126 of file itkGradientDescentOptimizer.h.


Member Function Documentation

virtual void itk::GradientDescentOptimizer::AdvanceOneStep void   )  [virtual]
 

Advance one step following the gradient direction.

Reimplemented in itk::QuaternionRigidTransformGradientDescentOptimizer.

virtual unsigned int itk::GradientDescentOptimizer::GetCurrentIteration  )  const [virtual]
 

Get the current iteration number.

virtual const DerivativeType& itk::GradientDescentOptimizer::GetGradient  )  [virtual]
 

Get Stop condition.

virtual const double& itk::GradientDescentOptimizer::GetLearningRate  )  [virtual]
 

Get the learning rate.

virtual const bool& itk::GradientDescentOptimizer::GetMaximize  )  [virtual]
 

Methods to configure the cost function.

bool itk::GradientDescentOptimizer::GetMinimize  )  const [inline]
 

Methods to configure the cost function.

Definition at line 75 of file itkGradientDescentOptimizer.h.

virtual const char* itk::GradientDescentOptimizer::GetNameOfClass  )  const [virtual]
 

Run-time type information (and related methods).

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::QuaternionRigidTransformGradientDescentOptimizer.

virtual const unsigned long& itk::GradientDescentOptimizer::GetNumberOfIterations  )  [virtual]
 

Get the number of iterations.

virtual const StopConditionType& itk::GradientDescentOptimizer::GetStopCondition  )  [virtual]
 

Get Stop condition.

virtual const double& itk::GradientDescentOptimizer::GetValue  )  [virtual]
 

Get the current value.

virtual void itk::GradientDescentOptimizer::MaximizeOff  )  [virtual]
 

Methods to configure the cost function.

virtual void itk::GradientDescentOptimizer::MaximizeOn  )  [virtual]
 

Methods to configure the cost function.

void itk::GradientDescentOptimizer::MinimizeOff  )  [inline]
 

Methods to configure the cost function.

Definition at line 81 of file itkGradientDescentOptimizer.h.

void itk::GradientDescentOptimizer::MinimizeOn  )  [inline]
 

Methods to configure the cost function.

Definition at line 79 of file itkGradientDescentOptimizer.h.

Pointer itk::GradientDescentOptimizer::New  )  [static]
 

Method for creation through the object factory.

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::QuaternionRigidTransformGradientDescentOptimizer.

void itk::GradientDescentOptimizer::PrintSelf std::ostream &  os,
Indent  indent
const [protected, virtual]
 

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::SingleValuedNonLinearOptimizer.

void itk::GradientDescentOptimizer::ResumeOptimization void   ) 
 

Resume previously stopped optimization with current parameters

See also:
StopOptimization.

virtual void itk::GradientDescentOptimizer::SetLearningRate double  _arg  )  [virtual]
 

Set the learning rate.

virtual void itk::GradientDescentOptimizer::SetMaximize bool  _arg  )  [virtual]
 

Methods to configure the cost function.

void itk::GradientDescentOptimizer::SetMinimize bool  v  )  [inline]
 

Methods to configure the cost function.

Definition at line 77 of file itkGradientDescentOptimizer.h.

virtual void itk::GradientDescentOptimizer::SetNumberOfIterations unsigned long  _arg  )  [virtual]
 

Set the number of iterations.

void itk::GradientDescentOptimizer::StartOptimization void   )  [virtual]
 

Start optimization.

Reimplemented from itk::Optimizer.

void itk::GradientDescentOptimizer::StopOptimization void   ) 
 

Stop optimization.

See also:
ResumeOptimization


Member Data Documentation

DerivativeType itk::GradientDescentOptimizer::m_Gradient [protected]
 

Definition at line 131 of file itkGradientDescentOptimizer.h.

double itk::GradientDescentOptimizer::m_LearningRate [protected]
 

Definition at line 133 of file itkGradientDescentOptimizer.h.

bool itk::GradientDescentOptimizer::m_Maximize [protected]
 

Definition at line 132 of file itkGradientDescentOptimizer.h.


The documentation for this class was generated from the following file:
Generated at Thu May 25 01:02:03 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000