SG++-Doxygen-Documentation
|
Rprop method for unconstrained optimization. More...
#include <Rprop.hpp>
Public Member Functions | |
void | clone (std::unique_ptr< UnconstrainedOptimizer > &clone) const override |
double | getInitialStepSize () const |
ScalarFunctionGradient & | getObjectiveGradient () const |
double | getStepSizeDecreaseFactor () const |
double | getStepSizeIncreaseFactor () const |
double | getTolerance () const |
void | optimize () override |
Pure virtual method for optimization of the objective function. More... | |
Rprop (const ScalarFunction &f, const ScalarFunctionGradient &fGradient, size_t maxItCount=DEFAULT_N, double tolerance=DEFAULT_TOLERANCE, double initialStepSize=DEFAULT_INITIAL_STEP_SIZE, double stepSizeIncreaseFactor=DEFAULT_STEP_SIZE_INCREASE_FACTOR, double stepSizeDecreaseFactor=DEFAULT_STEP_SIZE_DECREASE_FACTOR) | |
Constructor. More... | |
Rprop (const Rprop &other) | |
Copy constructor. More... | |
void | setInitialStepSize (double initialStepSize) |
void | setStepSizeDecreaseFactor (double stepSizeDecreaseFactor) |
void | setStepSizeIncreaseFactor (double stepSizeIncreaseFactor) |
void | setTolerance (double tolerance) |
~Rprop () override | |
Destructor. More... | |
Public Member Functions inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer | |
const base::DataMatrix & | getHistoryOfOptimalPoints () const |
const base::DataVector & | getHistoryOfOptimalValues () const |
size_t | getN () const |
ScalarFunction & | getObjectiveFunction () const |
const base::DataVector & | getOptimalPoint () const |
double | getOptimalValue () const |
const base::DataVector & | getStartingPoint () const |
void | setN (size_t N) |
void | setStartingPoint (const base::DataVector &startingPoint) |
UnconstrainedOptimizer (const ScalarFunction &f, size_t N=DEFAULT_N) | |
Constructor. More... | |
UnconstrainedOptimizer (const UnconstrainedOptimizer &other) | |
Copy constructor. More... | |
virtual | ~UnconstrainedOptimizer () |
Destructor. More... | |
Static Public Attributes | |
static constexpr double | DEFAULT_INITIAL_STEP_SIZE = 0.01 |
default initial step size More... | |
static constexpr double | DEFAULT_STEP_SIZE_DECREASE_FACTOR = 0.5 |
default step size decrease factor More... | |
static constexpr double | DEFAULT_STEP_SIZE_INCREASE_FACTOR = 1.2 |
default step size increase factor More... | |
static constexpr double | DEFAULT_TOLERANCE = 1e-6 |
default tolerance 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 | |
std::unique_ptr< ScalarFunctionGradient > | fGradient |
objective function gradient More... | |
double | initialAlpha |
initial step size More... | |
double | rhoAlphaMinus |
step size decrease factor More... | |
double | rhoAlphaPlus |
step size increase factor More... | |
double | theta |
tolerance 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... | |
Rprop method for unconstrained optimization.
sgpp::optimization::optimizer::Rprop::Rprop | ( | const ScalarFunction & | f, |
const ScalarFunctionGradient & | fGradient, | ||
size_t | maxItCount = DEFAULT_N , |
||
double | tolerance = DEFAULT_TOLERANCE , |
||
double | initialStepSize = DEFAULT_INITIAL_STEP_SIZE , |
||
double | stepSizeIncreaseFactor = DEFAULT_STEP_SIZE_INCREASE_FACTOR , |
||
double | stepSizeDecreaseFactor = DEFAULT_STEP_SIZE_DECREASE_FACTOR |
||
) |
Constructor.
f | objective function |
fGradient | objective function gradient |
maxItCount | maximal number of function evaluations |
tolerance | tolerance |
initialStepSize | initial step size |
stepSizeIncreaseFactor | step size increase factor |
stepSizeDecreaseFactor | step size decrease factor |
References sgpp::optimization::ScalarFunctionGradient::clone().
Referenced by clone().
sgpp::optimization::optimizer::Rprop::Rprop | ( | const Rprop & | other | ) |
|
override |
Destructor.
|
overridevirtual |
[out] | clone | pointer to cloned object |
Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.
References Rprop().
double sgpp::optimization::optimizer::Rprop::getInitialStepSize | ( | ) | const |
References initialAlpha.
ScalarFunctionGradient & sgpp::optimization::optimizer::Rprop::getObjectiveGradient | ( | ) | const |
References fGradient.
double sgpp::optimization::optimizer::Rprop::getStepSizeDecreaseFactor | ( | ) | const |
References rhoAlphaMinus.
double sgpp::optimization::optimizer::Rprop::getStepSizeIncreaseFactor | ( | ) | const |
References rhoAlphaPlus.
double sgpp::optimization::optimizer::Rprop::getTolerance | ( | ) | const |
References theta.
|
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 alpha, sgpp::base::DataVector::append(), sgpp::base::DataMatrix::appendRow(), sgpp::optimization::optimizer::UnconstrainedOptimizer::f, fGradient, sgpp::optimization::optimizer::UnconstrainedOptimizer::fHist, sgpp::optimization::optimizer::UnconstrainedOptimizer::fOpt, sgpp::optimization::Printer::getInstance(), initialAlpha, sgpp::base::DataVector::l2Norm(), sgpp::optimization::optimizer::UnconstrainedOptimizer::N, sgpp::optimization::Printer::printStatusBegin(), sgpp::optimization::Printer::printStatusEnd(), sgpp::optimization::Printer::printStatusUpdate(), sgpp::base::DataMatrix::resize(), rhoAlphaMinus, rhoAlphaPlus, sgpp::base::DataVector::sub(), theta, sgpp::base::DataVector::toString(), sgpp::optimization::optimizer::UnconstrainedOptimizer::x0, sgpp::optimization::optimizer::UnconstrainedOptimizer::xHist, and sgpp::optimization::optimizer::UnconstrainedOptimizer::xOpt.
void sgpp::optimization::optimizer::Rprop::setInitialStepSize | ( | double | initialStepSize | ) |
initialStepSize | initial step size |
References initialAlpha.
void sgpp::optimization::optimizer::Rprop::setStepSizeDecreaseFactor | ( | double | stepSizeDecreaseFactor | ) |
stepSizeDecreaseFactor | step size decrease factor |
References rhoAlphaMinus.
void sgpp::optimization::optimizer::Rprop::setStepSizeIncreaseFactor | ( | double | stepSizeIncreaseFactor | ) |
stepSizeIncreaseFactor | step size increase factor |
References rhoAlphaPlus.
void sgpp::optimization::optimizer::Rprop::setTolerance | ( | double | tolerance | ) |
tolerance | tolerance |
References theta.
|
static |
default initial step size
|
static |
default step size decrease factor
|
static |
default step size increase factor
|
static |
default tolerance
|
protected |
objective function gradient
Referenced by getObjectiveGradient(), optimize(), and Rprop().
|
protected |
initial step size
Referenced by getInitialStepSize(), optimize(), and setInitialStepSize().
|
protected |
step size decrease factor
Referenced by getStepSizeDecreaseFactor(), optimize(), and setStepSizeDecreaseFactor().
|
protected |
step size increase factor
Referenced by getStepSizeIncreaseFactor(), optimize(), and setStepSizeIncreaseFactor().
|
protected |
tolerance
Referenced by getTolerance(), optimize(), and setTolerance().