13#include <MachineLearning/BaseGradientOptimizationMethod.h>
17 namespace MachineLearning
24 enum ScaledConjugateGradientMethod
143 template<
typename Scalar, LineSearchType LSType = MoreThuente>
197 virtual bool Optimize(
int* cycle =
nullptr)
override;
Base class for gradient-based optimization methods.
Conjugate Gradient exit codes.
ScaledConjugateGradient(int numberOfVariables, std::function< Scalar(const af::array &, af::array &)> function)
Creates a new instance of the CG optimization algorithm.
virtual bool Optimize(int *cycle=nullptr) override
Implements the actual optimization algorithm. This method should try to minimize the objective functi...
ScaledConjugateGradient(NonlinearObjectiveFunction< Scalar > *function)
Creates a new instance of the CG optimization algorithm.
ScaledConjugateGradient(int numberOfVariables)
Creates a new instance of the CG optimization algorithm.