13#include <NeMachineLearningLib.h>
14#include <MachineLearning/BaseOptimizationMethod.h>
15#include <MachineLearning/FgILineSearch.h>
19 namespace MachineLearning
27 StrongWolfeBacktracking,
28 StrongWolfeBracketing,
38 template<
typename Scalar, LineSearchType LSType = MoreThuente>
248 std::function<
Scalar(
const af::array&, af::array&)> function);
Base class for gradient-based optimization methods.
BaseGradientOptimizationMethod(int numberOfVariables, std::function< Scalar(const af::array &, af::array &)> function)
Initializes a new instance of the BaseGradientOptimizationMethod class.
int GetMaxIterations()
Gets the maximum number of iterations to be performed during optimization. Default is 0 (iterate unti...
Scalar GetTolerance()
Gets the relative difference threshold to be used as stopping criteria between two iterations....
void SetMaxIterations(int iter)
Sets the maximum number of iterations to be performed during optimization. Default is 0 (iterate unti...
void SetTolerance(Scalar tolerance)
Sets the relative difference threshold to be used as stopping criteria between two iterations....
void InitLinesearch()
Inits linesearch.
BaseGradientOptimizationMethod(NonlinearObjectiveFunction< Scalar > *function)
Initializes a new instance of the BaseGradientOptimizationMethod class.
BaseGradientOptimizationMethod(int numberOfVariables)
Initializes a new instance of the BaseGradientOptimizationMethod class.
int GetIterations()
Gets the number of iterations performed in the last call to IOptimizationMethod.Minimize().
Base class for optimization methods.