ITK
5.0.0
Insight Segmentation and Registration Toolkit
|
#include <itkConjugateGradientLineSearchOptimizerv4.h>
Conjugate gradient descent optimizer with a golden section line search for nonlinear optimization.
ConjugateGradientLineSearchOptimizer implements a conjugate 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
where d is defined as the Polak-Ribiere conjugate gradient.
Options are identical to the superclass's.
Definition at line 47 of file itkConjugateGradientLineSearchOptimizerv4.h.
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother () const |
virtual const char * | GetNameOfClass () const |
void | StartOptimization (bool doOnlyInitialization=false) override |
Public Member Functions inherited from itk::GradientDescentLineSearchOptimizerv4Template< TInternalComputationValueType > | |
virtual ::itk::LightObject::Pointer | CreateAnother () const |
virtual void | SetEpsilon (TInternalComputationValueType _arg) |
virtual TInternalComputationValueType | GetEpsilon () |
virtual void | SetLowerLimit (TInternalComputationValueType _arg) |
virtual TInternalComputationValueType | GetLowerLimit () |
virtual void | SetUpperLimit (TInternalComputationValueType _arg) |
virtual TInternalComputationValueType | GetUpperLimit () |
virtual void | SetMaximumLineSearchIterations (unsigned int _arg) |
virtual unsigned int | GetMaximumLineSearchIterations () |
Public Member Functions inherited from itk::GradientDescentOptimizerv4Template< TInternalComputationValueType > | |
virtual ::itk::LightObject::Pointer | CreateAnother () const |
virtual void | EstimateLearningRate () |
virtual const TInternalComputationValueType & | GetConvergenceValue () const |
void | ResumeOptimization () override |
virtual void | SetConvergenceWindowSize (SizeValueType _arg) |
virtual void | SetMinimumConvergenceValue (TInternalComputationValueType _arg) |
void | StartOptimization (bool doOnlyInitialization=false) override |
void | StopOptimization () override |
virtual void | SetLearningRate (TInternalComputationValueType _arg) |
virtual const TInternalComputationValueType & | GetLearningRate () const |
virtual void | SetMaximumStepSizeInPhysicalUnits (TInternalComputationValueType _arg) |
virtual const TInternalComputationValueType & | GetMaximumStepSizeInPhysicalUnits () const |
virtual void | SetDoEstimateLearningRateAtEachIteration (bool _arg) |
virtual const bool & | GetDoEstimateLearningRateAtEachIteration () const |
virtual void | DoEstimateLearningRateAtEachIterationOn () |
virtual void | DoEstimateLearningRateAtEachIterationOff () |
virtual void | SetDoEstimateLearningRateOnce (bool _arg) |
virtual const bool & | GetDoEstimateLearningRateOnce () const |
virtual void | DoEstimateLearningRateOnceOn () |
virtual void | DoEstimateLearningRateOnceOff () |
virtual void | SetReturnBestParametersAndValue (bool _arg) |
virtual const bool & | GetReturnBestParametersAndValue () const |
virtual void | ReturnBestParametersAndValueOn () |
virtual void | ReturnBestParametersAndValueOff () |
Public Member Functions inherited from itk::GradientDescentOptimizerBasev4Template< TInternalComputationValueType > | |
SizeValueType | GetCurrentIteration () const override |
virtual const DerivativeType & | GetGradient () const |
SizeValueType | GetNumberOfIterations () const override |
virtual const StopConditionType & | GetStopCondition () const |
const StopConditionReturnStringType | GetStopConditionDescription () const override |
void | SetNumberOfIterations (const SizeValueType numberOfIterations) override |
virtual void | ModifyGradientByScales () |
virtual void | ModifyGradientByLearningRate () |
Public Member Functions inherited from itk::ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType > | |
virtual const MeasureType & | GetCurrentMetricValue () const |
virtual const ParametersType & | GetCurrentPosition () const |
virtual const ThreadIdType & | GetNumberOfWorkUnits () const |
virtual const ScalesType & | GetScales () const |
virtual const bool & | GetScalesAreIdentity () const |
bool | GetScalesInitialized () const |
virtual const MeasureType & | GetValue () const |
virtual const ScalesType & | GetWeights () const |
virtual const bool & | GetWeightsAreIdentity () const |
virtual void | SetNumberOfWorkUnits (ThreadIdType number) |
virtual void | SetScalesEstimator (ScalesEstimatorType *_arg) |
virtual void | SetWeights (ScalesType _arg) |
virtual void | SetMetric (MetricType *_arg) |
virtual MetricType * | GetModifiableMetric () |
virtual const MetricType * | GetMetric () const |
virtual void | SetScales (const ScalesType &scales) |
virtual void | SetDoEstimateScales (bool _arg) |
virtual const bool & | GetDoEstimateScales () const |
virtual void | DoEstimateScalesOn () |
virtual void | DoEstimateScalesOff () |
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 |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexceptoverride |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () 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 () |
Static Public Member Functions inherited from itk::GradientDescentLineSearchOptimizerv4Template< TInternalComputationValueType > | |
static Pointer | New () |
Static Public Member Functions inherited from itk::GradientDescentOptimizerv4Template< TInternalComputationValueType > | |
static Pointer | New () |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool flag) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Protected Member Functions | |
void | AdvanceOneStep () override |
ConjugateGradientLineSearchOptimizerv4Template ()=default | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~ConjugateGradientLineSearchOptimizerv4Template () override=default | |
Protected Member Functions inherited from itk::GradientDescentLineSearchOptimizerv4Template< TInternalComputationValueType > | |
void | AdvanceOneStep () override |
TInternalComputationValueType | GoldenSectionSearch (TInternalComputationValueType a, TInternalComputationValueType b, TInternalComputationValueType c, TInternalComputationValueType metricb=NumericTraits< TInternalComputationValueType >::max()) |
GradientDescentLineSearchOptimizerv4Template () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~GradientDescentLineSearchOptimizerv4Template () override=default | |
Protected Member Functions inherited from itk::GradientDescentOptimizerv4Template< TInternalComputationValueType > | |
GradientDescentOptimizerv4Template () | |
void | ModifyGradientByLearningRateOverSubRange (const IndexRangeType &subrange) override |
void | ModifyGradientByScalesOverSubRange (const IndexRangeType &subrange) override |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~GradientDescentOptimizerv4Template () override=default | |
Protected Member Functions inherited from itk::GradientDescentOptimizerBasev4Template< TInternalComputationValueType > | |
GradientDescentOptimizerBasev4Template () | |
~GradientDescentOptimizerBasev4Template () override=default | |
Protected Member Functions inherited from itk::ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType > | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
ObjectToObjectOptimizerBaseTemplate () | |
~ObjectToObjectOptimizerBaseTemplate () override | |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
virtual void | SetTimeStamp (const TimeStamp &time) |
~Object () override | |
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 () |
Private Attributes | |
DerivativeType | m_ConjugateGradient |
DerivativeType | m_LastGradient |
using itk::ConjugateGradientLineSearchOptimizerv4Template< TInternalComputationValueType >::ConstPointer = SmartPointer< const Self > |
Definition at line 57 of file itkConjugateGradientLineSearchOptimizerv4.h.
using itk::ConjugateGradientLineSearchOptimizerv4Template< TInternalComputationValueType >::ConvergenceMonitoringType = itk::Function::WindowConvergenceMonitoringFunction<TInternalComputationValueType> |
Type for the convergence checker
Definition at line 75 of file itkConjugateGradientLineSearchOptimizerv4.h.
using itk::ConjugateGradientLineSearchOptimizerv4Template< TInternalComputationValueType >::DerivativeType = typename Superclass::DerivativeType |
Derivative type
Definition at line 69 of file itkConjugateGradientLineSearchOptimizerv4.h.
using itk::ConjugateGradientLineSearchOptimizerv4Template< TInternalComputationValueType >::InternalComputationValueType = TInternalComputationValueType |
It should be possible to derive the internal computation type from the class object.
Definition at line 66 of file itkConjugateGradientLineSearchOptimizerv4.h.
using itk::ConjugateGradientLineSearchOptimizerv4Template< TInternalComputationValueType >::MeasureType = typename Superclass::MeasureType |
Metric type over which this class is templated
Definition at line 72 of file itkConjugateGradientLineSearchOptimizerv4.h.
using itk::ConjugateGradientLineSearchOptimizerv4Template< TInternalComputationValueType >::Pointer = SmartPointer< Self > |
Definition at line 56 of file itkConjugateGradientLineSearchOptimizerv4.h.
using itk::ConjugateGradientLineSearchOptimizerv4Template< TInternalComputationValueType >::Self = ConjugateGradientLineSearchOptimizerv4Template |
Standard class type aliases.
Definition at line 54 of file itkConjugateGradientLineSearchOptimizerv4.h.
using itk::ConjugateGradientLineSearchOptimizerv4Template< TInternalComputationValueType >::Superclass = GradientDescentLineSearchOptimizerv4Template<TInternalComputationValueType> |
Definition at line 55 of file itkConjugateGradientLineSearchOptimizerv4.h.
|
protecteddefault |
Default constructor
|
overrideprotecteddefault |
Destructor
|
overrideprotectedvirtual |
Advance one Step following the gradient direction. Includes transform update.
Reimplemented from itk::GradientDescentOptimizerv4Template< TInternalComputationValueType >.
|
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::Object.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::GradientDescentLineSearchOptimizerv4Template< TInternalComputationValueType >.
|
static |
New macro for creation of through a Smart Pointer
|
overrideprotectedvirtual |
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::Object.
|
overridevirtual |
Run the optimization.
doOnlyInitialization | This is false by default. It should only be set to true for special cases when the class should be initialized to perform optimization, but no optimization should be run. For example, itkMultiGradientOptimizerv4 needs to do this. |
Reimplemented from itk::ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType >.
|
private |
Definition at line 96 of file itkConjugateGradientLineSearchOptimizerv4.h.
|
private |
Definition at line 95 of file itkConjugateGradientLineSearchOptimizerv4.h.