SG++-Doxygen-Documentation
|
Gradient-based method of steepest descent. More...
#include <GradientDescent.hpp>
Static Public Attributes | |
static constexpr double | DEFAULT_BETA = 0.5 |
default beta (parameter for Armijo's rule) More... | |
static constexpr double | DEFAULT_EPSILON = 1e-18 |
default epsilon (parameter for Armijo's rule) More... | |
static constexpr double | DEFAULT_GAMMA = 1e-2 |
default gamma (parameter for Armijo's rule) More... | |
static const size_t | DEFAULT_MAX_IT_COUNT = 2000 |
default maximal number of iterations More... | |
static constexpr double | DEFAULT_TOLERANCE = 1e-8 |
default tolerance (parameter for Armijo's rule) More... | |
Static Public Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer | |
static const size_t | DEFAULT_N = 1000 |
default maximal number of iterations or function evaluations More... | |
Protected Attributes | |
double | beta |
beta (parameter for Armijo's rule) More... | |
double | eps |
epsilon (parameter for Armijo's rule) More... | |
std::unique_ptr< ScalarFunctionGradient > | fGradient |
objective function gradient More... | |
double | gamma |
gamma (parameter for Armijo's rule) More... | |
double | tol |
tolerance (parameter for Armijo's rule) More... | |
Protected Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer | |
std::unique_ptr< ScalarFunction > | f |
objective function More... | |
base::DataVector | fHist |
search history vector (optimal values) More... | |
double | fOpt |
result of optimization (optimal function value) More... | |
size_t | N |
maximal number of iterations or function evaluations More... | |
base::DataVector | x0 |
starting point More... | |
base::DataMatrix | xHist |
search history matrix (optimal points) More... | |
base::DataVector | xOpt |
result of optimization (location of optimum) More... | |
Gradient-based method of steepest descent.
sgpp::optimization::optimizer::GradientDescent::GradientDescent | ( | const ScalarFunction & | f, |
const ScalarFunctionGradient & | fGradient, | ||
size_t | maxItCount = DEFAULT_MAX_IT_COUNT , |
||
double | beta = DEFAULT_BETA , |
||
double | gamma = DEFAULT_GAMMA , |
||
double | tolerance = DEFAULT_TOLERANCE , |
||
double | epsilon = DEFAULT_EPSILON |
||
) |
Constructor.
f | objective function |
fGradient | objective function gradient |
maxItCount | maximal number of iterations |
beta | beta (parameter for Armijo's rule) |
gamma | gamma (parameter for Armijo's rule) |
tolerance | tolerance (parameter for Armijo's rule) |
epsilon | epsilon (parameter for Armijo's rule) |
References sgpp::optimization::ScalarFunctionGradient::clone().
Referenced by clone().
sgpp::optimization::optimizer::GradientDescent::GradientDescent | ( | const GradientDescent & | other | ) |
|
override |
Destructor.
|
overridevirtual |
[out] | clone | pointer to cloned object |
Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.
References GradientDescent().
double sgpp::optimization::optimizer::GradientDescent::getBeta | ( | ) | const |
References beta.
double sgpp::optimization::optimizer::GradientDescent::getEpsilon | ( | ) | const |
References eps.
double sgpp::optimization::optimizer::GradientDescent::getGamma | ( | ) | const |
References gamma.
ScalarFunctionGradient & sgpp::optimization::optimizer::GradientDescent::getObjectiveGradient | ( | ) | const |
References fGradient.
double sgpp::optimization::optimizer::GradientDescent::getTolerance | ( | ) | const |
References tol.
|
overridevirtual |
Pure virtual method for optimization of the objective function.
The result of the optimization process can be obtained by member functions, e.g., getOptimalPoint() and getOptimalValue().
Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.
References sgpp::base::DataVector::append(), sgpp::base::DataMatrix::appendRow(), beta, eps, sgpp::optimization::optimizer::UnconstrainedOptimizer::f, fGradient, sgpp::optimization::optimizer::UnconstrainedOptimizer::fHist, sgpp::optimization::optimizer::UnconstrainedOptimizer::fOpt, gamma, sgpp::optimization::Printer::getInstance(), sgpp::base::DataVector::l2Norm(), sgpp::optimization::optimizer::lineSearchArmijo(), sgpp::optimization::optimizer::UnconstrainedOptimizer::N, sgpp::optimization::Printer::printStatusBegin(), sgpp::optimization::Printer::printStatusEnd(), sgpp::optimization::Printer::printStatusUpdate(), sgpp::base::DataMatrix::resize(), create_scripts::s, tol, sgpp::base::DataVector::toString(), sgpp::optimization::optimizer::UnconstrainedOptimizer::x0, sgpp::optimization::optimizer::UnconstrainedOptimizer::xHist, and sgpp::optimization::optimizer::UnconstrainedOptimizer::xOpt.
void sgpp::optimization::optimizer::GradientDescent::setBeta | ( | double | beta | ) |
beta | beta (parameter for Armijo's rule) |
References beta.
void sgpp::optimization::optimizer::GradientDescent::setEpsilon | ( | double | epsilon | ) |
epsilon | epsilon (parameter for Armijo's rule) |
References eps.
void sgpp::optimization::optimizer::GradientDescent::setGamma | ( | double | gamma | ) |
gamma | gamma (parameter for Armijo's rule) |
References gamma.
void sgpp::optimization::optimizer::GradientDescent::setTolerance | ( | double | tolerance | ) |
tolerance | tolerance (parameter for Armijo's rule) |
References tol.
|
protected |
beta (parameter for Armijo's rule)
Referenced by getBeta(), optimize(), and setBeta().
|
static |
default beta (parameter for Armijo's rule)
|
static |
default epsilon (parameter for Armijo's rule)
|
static |
default gamma (parameter for Armijo's rule)
|
static |
default maximal number of iterations
|
static |
default tolerance (parameter for Armijo's rule)
|
protected |
epsilon (parameter for Armijo's rule)
Referenced by getEpsilon(), optimize(), and setEpsilon().
|
protected |
objective function gradient
Referenced by getObjectiveGradient(), GradientDescent(), and optimize().
|
protected |
gamma (parameter for Armijo's rule)
Referenced by getGamma(), optimize(), and setGamma().
|
protected |
tolerance (parameter for Armijo's rule)
Referenced by getTolerance(), optimize(), and setTolerance().