![]() |
SG++-Doxygen-Documentation
|
Newton method with adaptive step size. More...
#include <AdaptiveNewton.hpp>
Static Public Attributes | |
static constexpr double | DEFAULT_DAMPING_DECREASE_FACTOR = 0.5 |
default damping decrease factor | |
static constexpr double | DEFAULT_DAMPING_INCREASE_FACTOR = 1.0 |
default damping increase factor | |
static constexpr double | DEFAULT_LINE_SEARCH_ACCURACY = 0.01 |
default line search accuracy | |
static constexpr double | DEFAULT_STEP_SIZE_DECREASE_FACTOR = 0.5 |
default step size decrease factor | |
static constexpr double | DEFAULT_STEP_SIZE_INCREASE_FACTOR = 1.2 |
default step size increase factor | |
static constexpr double | DEFAULT_TOLERANCE = 1e-6 |
default tolerance | |
![]() | |
static const size_t | DEFAULT_N = 1000 |
default maximal number of iterations or function evaluations | |
Protected Attributes | |
const base::sle_solver::GaussianElimination | defaultSleSolver |
default linear solver | |
double | rhoAlphaMinus |
step size decrease factor | |
double | rhoAlphaPlus |
step size increase factor | |
double | rhoLambdaMinus |
damping decrease factor | |
double | rhoLambdaPlus |
damping increase factor | |
double | rhoLs |
line search accuracy | |
const base::sle_solver::SLESolver & | sleSolver |
linear solver | |
double | theta |
tolerance | |
![]() | |
std::unique_ptr< base::ScalarFunction > | f |
objective function | |
std::unique_ptr< base::ScalarFunctionGradient > | fGradient |
objective function gradient | |
std::unique_ptr< base::ScalarFunctionHessian > | fHessian |
objective function Hessian | |
base::DataVector | fHist |
search history vector (optimal values) | |
double | fOpt |
result of optimization (optimal function value) | |
size_t | N |
maximal number of iterations or function evaluations | |
base::DataVector | x0 |
starting point | |
base::DataMatrix | xHist |
search history matrix (optimal points) | |
base::DataVector | xOpt |
result of optimization (location of optimum) | |
Newton method with adaptive step size.
sgpp::optimization::optimizer::AdaptiveNewton::AdaptiveNewton | ( | const base::ScalarFunction & | f, |
const base::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 |
sgpp::optimization::optimizer::AdaptiveNewton::AdaptiveNewton | ( | const base::ScalarFunction & | f, |
const base::ScalarFunctionHessian & | fHessian, | ||
size_t | maxItCount, | ||
double | tolerance, | ||
double | stepSizeIncreaseFactor, | ||
double | stepSizeDecreaseFactor, | ||
double | dampingIncreaseFactor, | ||
double | dampingDecreaseFactor, | ||
double | lineSearchAccuracy, | ||
const base::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) |
sgpp::optimization::optimizer::AdaptiveNewton::AdaptiveNewton | ( | const AdaptiveNewton & | other | ) |
Copy constructor.
other | optimizer to be copied |
|
override |
Destructor.
|
overridevirtual |
[out] | clone | pointer to cloned object |
Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.
References clone().
Referenced by clone().
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.
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(), sgpp::base::Printer::disableStatusPrinting(), sgpp::base::DataVector::dotProduct(), sgpp::base::Printer::enableStatusPrinting(), sgpp::optimization::optimizer::UnconstrainedOptimizer::f, sgpp::optimization::optimizer::UnconstrainedOptimizer::fHessian, sgpp::optimization::optimizer::UnconstrainedOptimizer::fHist, sgpp::optimization::optimizer::UnconstrainedOptimizer::fOpt, sgpp::base::Printer::getInstance(), sgpp::base::Printer::isStatusPrintingEnabled(), sgpp::base::DataVector::l2Norm(), lambda, sgpp::optimization::optimizer::UnconstrainedOptimizer::N, sgpp::base::Printer::printStatusBegin(), sgpp::base::Printer::printStatusEnd(), sgpp::base::Printer::printStatusUpdate(), sgpp::base::DataMatrix::resize(), rhoAlphaMinus, rhoAlphaPlus, rhoLambdaMinus, rhoLambdaPlus, rhoLs, sleSolver, sgpp::base::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.
|
staticconstexpr |
default damping decrease factor
|
staticconstexpr |
default damping increase factor
|
staticconstexpr |
default line search accuracy
|
staticconstexpr |
default step size decrease factor
|
staticconstexpr |
default step size increase factor
|
staticconstexpr |
default tolerance
|
protected |
default linear solver
|
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().