SG++-Doxygen-Documentation
|
Newton method with adaptive step size. More...
#include <AdaptiveNewton.hpp>
Public Member Functions | |
AdaptiveNewton (const ScalarFunction &f, const ScalarFunctionHessian &fHessian, size_t maxItCount=DEFAULT_N, double tolerance=DEFAULT_TOLERANCE, double stepSizeIncreaseFactor=DEFAULT_STEP_SIZE_INCREASE_FACTOR, double stepSizeDecreaseFactor=DEFAULT_STEP_SIZE_DECREASE_FACTOR, double dampingIncreaseFactor=DEFAULT_DAMPING_INCREASE_FACTOR, double dampingDecreaseFactor=DEFAULT_DAMPING_DECREASE_FACTOR, double lineSearchAccuracy=DEFAULT_LINE_SEARCH_ACCURACY) | |
Constructor. More... | |
AdaptiveNewton (const ScalarFunction &f, const ScalarFunctionHessian &fHessian, size_t maxItCount, double tolerance, double stepSizeIncreaseFactor, double stepSizeDecreaseFactor, double dampingIncreaseFactor, double dampingDecreaseFactor, double lineSearchAccuracy, const sle_solver::SLESolver &sleSolver) | |
Constructor. More... | |
AdaptiveNewton (const AdaptiveNewton &other) | |
Copy constructor. More... | |
void | clone (std::unique_ptr< UnconstrainedOptimizer > &clone) const override |
double | getDampingDecreaseFactor () const |
double | getDampingIncreaseFactor () const |
double | getLineSearchAccuracy () const |
ScalarFunctionHessian & | getObjectiveHessian () const |
double | getStepSizeDecreaseFactor () const |
double | getStepSizeIncreaseFactor () const |
double | getTolerance () const |
void | optimize () override |
Pure virtual method for optimization of the objective function. More... | |
void | setDampingDecreaseFactor (double dampingDecreaseFactor) |
void | setDampingIncreaseFactor (double dampingIncreaseFactor) |
void | setLineSearchAccuracy (double lineSearchAccuracy) |
void | setStepSizeDecreaseFactor (double stepSizeDecreaseFactor) |
void | setStepSizeIncreaseFactor (double stepSizeIncreaseFactor) |
void | setTolerance (double tolerance) |
~AdaptiveNewton () 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_DAMPING_DECREASE_FACTOR = 0.5 |
default damping decrease factor More... | |
static constexpr double | DEFAULT_DAMPING_INCREASE_FACTOR = 1.0 |
default damping increase factor More... | |
static constexpr double | DEFAULT_LINE_SEARCH_ACCURACY = 0.01 |
default line search accuracy 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 | |
const sle_solver::GaussianElimination | defaultSleSolver |
default linear solver More... | |
std::unique_ptr< ScalarFunctionHessian > | fHessian |
objective function Hessian More... | |
double | rhoAlphaMinus |
step size decrease factor More... | |
double | rhoAlphaPlus |
step size increase factor More... | |
double | rhoLambdaMinus |
damping decrease factor More... | |
double | rhoLambdaPlus |
damping increase factor More... | |
double | rhoLs |
line search accuracy More... | |
const sle_solver::SLESolver & | sleSolver |
linear solver 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... | |
Newton method with adaptive step size.
sgpp::optimization::optimizer::AdaptiveNewton::AdaptiveNewton | ( | const ScalarFunction & | f, |
const ScalarFunctionHessian & | fHessian, | ||
size_t | maxItCount = DEFAULT_N , |
||
double | tolerance = DEFAULT_TOLERANCE , |
||
double | stepSizeIncreaseFactor = DEFAULT_STEP_SIZE_INCREASE_FACTOR , |
||
double | stepSizeDecreaseFactor = DEFAULT_STEP_SIZE_DECREASE_FACTOR , |
||
double | dampingIncreaseFactor = DEFAULT_DAMPING_INCREASE_FACTOR , |
||
double | dampingDecreaseFactor = DEFAULT_DAMPING_DECREASE_FACTOR , |
||
double | lineSearchAccuracy = DEFAULT_LINE_SEARCH_ACCURACY |
||
) |
Constructor.
By default, GaussianElimination is used to solve the linear systems.
f | objective function |
fHessian | objective function Hessian |
maxItCount | maximal number of function evaluations |
tolerance | tolerance |
stepSizeIncreaseFactor | step size increase factor |
stepSizeDecreaseFactor | step size decrease factor |
dampingIncreaseFactor | damping increase factor |
dampingDecreaseFactor | damping decrease factor |
lineSearchAccuracy | line search accuracy |
References sgpp::optimization::ScalarFunctionHessian::clone().
Referenced by clone().
sgpp::optimization::optimizer::AdaptiveNewton::AdaptiveNewton | ( | const ScalarFunction & | f, |
const ScalarFunctionHessian & | fHessian, | ||
size_t | maxItCount, | ||
double | tolerance, | ||
double | stepSizeIncreaseFactor, | ||
double | stepSizeDecreaseFactor, | ||
double | dampingIncreaseFactor, | ||
double | dampingDecreaseFactor, | ||
double | lineSearchAccuracy, | ||
const sle_solver::SLESolver & | sleSolver | ||
) |
Constructor.
Do not destruct the solver before this object!
f | objective function |
fHessian | objective function Hessian |
maxItCount | maximal number of function evaluations |
tolerance | tolerance |
stepSizeIncreaseFactor | step size increase factor |
stepSizeDecreaseFactor | step size decrease factor |
dampingIncreaseFactor | damping increase factor |
dampingDecreaseFactor | damping decrease factor |
lineSearchAccuracy | line search accuracy |
sleSolver | reference to linear solver for solving the linear systems (Hessian as coefficient matrix) |
References sgpp::optimization::ScalarFunctionHessian::clone().
sgpp::optimization::optimizer::AdaptiveNewton::AdaptiveNewton | ( | const AdaptiveNewton & | other | ) |
|
override |
Destructor.
|
overridevirtual |
[out] | clone | pointer to cloned object |
Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.
References AdaptiveNewton().
double sgpp::optimization::optimizer::AdaptiveNewton::getDampingDecreaseFactor | ( | ) | const |
References rhoLambdaMinus.
double sgpp::optimization::optimizer::AdaptiveNewton::getDampingIncreaseFactor | ( | ) | const |
References rhoLambdaPlus.
double sgpp::optimization::optimizer::AdaptiveNewton::getLineSearchAccuracy | ( | ) | const |
References rhoLs.
ScalarFunctionHessian & sgpp::optimization::optimizer::AdaptiveNewton::getObjectiveHessian | ( | ) | const |
References fHessian.
double sgpp::optimization::optimizer::AdaptiveNewton::getStepSizeDecreaseFactor | ( | ) | const |
References rhoAlphaMinus.
double sgpp::optimization::optimizer::AdaptiveNewton::getStepSizeIncreaseFactor | ( | ) | const |
References rhoAlphaPlus.
double sgpp::optimization::optimizer::AdaptiveNewton::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(), chess::b, sgpp::optimization::Printer::disableStatusPrinting(), sgpp::base::DataVector::dotProduct(), sgpp::optimization::Printer::enableStatusPrinting(), sgpp::optimization::optimizer::UnconstrainedOptimizer::f, fHessian, sgpp::optimization::optimizer::UnconstrainedOptimizer::fHist, sgpp::optimization::optimizer::UnconstrainedOptimizer::fOpt, sgpp::optimization::Printer::getInstance(), sgpp::optimization::Printer::isStatusPrintingEnabled(), sgpp::base::DataVector::l2Norm(), lambda, sgpp::optimization::optimizer::UnconstrainedOptimizer::N, sgpp::combigrid::pow(), sgpp::optimization::Printer::printStatusBegin(), sgpp::optimization::Printer::printStatusEnd(), sgpp::optimization::Printer::printStatusUpdate(), sgpp::base::DataMatrix::resize(), rhoAlphaMinus, rhoAlphaPlus, rhoLambdaMinus, rhoLambdaPlus, rhoLs, sleSolver, sgpp::optimization::sle_solver::SLESolver::solve(), 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::AdaptiveNewton::setDampingDecreaseFactor | ( | double | dampingDecreaseFactor | ) |
dampingDecreaseFactor | damping decrease factor |
References rhoLambdaMinus.
void sgpp::optimization::optimizer::AdaptiveNewton::setDampingIncreaseFactor | ( | double | dampingIncreaseFactor | ) |
dampingIncreaseFactor | damping increase factor |
References rhoLambdaPlus.
void sgpp::optimization::optimizer::AdaptiveNewton::setLineSearchAccuracy | ( | double | lineSearchAccuracy | ) |
lineSearchAccuracy | line search accuracy |
References rhoLs.
void sgpp::optimization::optimizer::AdaptiveNewton::setStepSizeDecreaseFactor | ( | double | stepSizeDecreaseFactor | ) |
stepSizeDecreaseFactor | step size decrease factor |
References rhoAlphaMinus.
void sgpp::optimization::optimizer::AdaptiveNewton::setStepSizeIncreaseFactor | ( | double | stepSizeIncreaseFactor | ) |
stepSizeIncreaseFactor | step size increase factor |
References rhoAlphaPlus.
void sgpp::optimization::optimizer::AdaptiveNewton::setTolerance | ( | double | tolerance | ) |
tolerance | tolerance |
References theta.
|
static |
default damping decrease factor
|
static |
default damping increase factor
|
static |
default line search accuracy
|
static |
default step size decrease factor
|
static |
default step size increase factor
|
static |
default tolerance
|
protected |
default linear solver
|
protected |
objective function Hessian
Referenced by AdaptiveNewton(), getObjectiveHessian(), and optimize().
|
protected |
step size decrease factor
Referenced by getStepSizeDecreaseFactor(), optimize(), and setStepSizeDecreaseFactor().
|
protected |
step size increase factor
Referenced by getStepSizeIncreaseFactor(), optimize(), and setStepSizeIncreaseFactor().
|
protected |
damping decrease factor
Referenced by getDampingDecreaseFactor(), optimize(), and setDampingDecreaseFactor().
|
protected |
damping increase factor
Referenced by getDampingIncreaseFactor(), optimize(), and setDampingIncreaseFactor().
|
protected |
line search accuracy
Referenced by getLineSearchAccuracy(), optimize(), and setLineSearchAccuracy().
|
protected |
linear solver
Referenced by optimize().
|
protected |
tolerance
Referenced by getTolerance(), optimize(), and setTolerance().