18 #ifndef itkSPSAOptimizer_h
19 #define itkSPSAOptimizer_h
23 #include "ITKOptimizersExport.h"
46 extern ITKOptimizers_EXPORT std::ostream &
83 #if !defined(ITK_LEGACY_REMOVE)
88 StopConditionSPSAOptimizerEnum::MaximumNumberOfIterations;
98 StartOptimization()
override;
103 ResumeOptimization();
132 GuessParameters(
SizeValueType numberOfGradientEstimates,
double initialStepSize);
141 itkGetConstMacro(LearningRate,
double);
144 itkGetConstMacro(GradientMagnitude,
double);
150 itkSetMacro(Sa,
double);
151 itkGetConstMacro(Sa,
double);
166 itkSetMacro(Sc,
double);
167 itkGetConstMacro(Sc,
double);
182 itkSetMacro(A,
double);
183 itkGetConstMacro(A,
double);
187 itkSetMacro(Alpha,
double);
188 itkGetConstMacro(Alpha,
double);
192 itkSetMacro(Gamma,
double);
193 itkGetConstMacro(Gamma,
double);
197 itkGetConstMacro(Maximize,
bool);
198 itkSetMacro(Maximize,
bool);
199 itkBooleanMacro(Maximize);
208 this->SetMaximize(!v);
242 itkGetConstMacro(StateOfConvergence,
double);
245 itkSetMacro(StateOfConvergenceDecayRate,
double);
246 itkGetConstMacro(StateOfConvergenceDecayRate,
double);
260 itkSetMacro(Tolerance,
double);
261 itkGetConstMacro(Tolerance,
double);
266 GetStopConditionDescription()
const override;
274 PrintSelf(std::ostream & os,
Indent indent)
const override;
279 double m_LearningRate{};
283 bool m_Stop{
false };
287 double m_StateOfConvergence{};
312 GenerateDelta(
const unsigned int spaceDimension);
319 ComputeGradient(
const ParametersType & parameters, DerivativeType & gradient);
325 double m_StateOfConvergenceDecayRate{};
326 double m_Tolerance{};
328 double m_GradientMagnitude{};
340 extern ITKOptimizers_EXPORT std::ostream &
345 #endif // end #ifndef itkSPSAOptimizer_h