SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
sgpp::optimization::optimizer::AdaptiveNewton Class Reference

Newton method with adaptive step size. More...

#include <AdaptiveNewton.hpp>

Inheritance diagram for sgpp::optimization::optimizer::AdaptiveNewton:
sgpp::optimization::optimizer::UnconstrainedOptimizer

Public Member Functions

 AdaptiveNewton (const AdaptiveNewton &other)
 Copy constructor.
 
 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.
 
 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.
 
void clone (std::unique_ptr< UnconstrainedOptimizer > &clone) const override
 
double getDampingDecreaseFactor () const
 
double getDampingIncreaseFactor () const
 
double getLineSearchAccuracy () const
 
double getStepSizeDecreaseFactor () const
 
double getStepSizeIncreaseFactor () const
 
double getTolerance () const
 
void optimize () override
 Pure virtual method for optimization of the objective function.
 
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.
 
- Public Member Functions inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
const base::DataMatrixgetHistoryOfOptimalPoints () const
 
const base::DataVectorgetHistoryOfOptimalValues () const
 
size_t getN () const
 
base::ScalarFunctiongetObjectiveFunction () const
 
base::ScalarFunctionGradientgetObjectiveGradient () const
 
base::ScalarFunctionHessiangetObjectiveHessian () const
 
const base::DataVectorgetOptimalPoint () const
 
double getOptimalValue () const
 
const base::DataVectorgetStartingPoint () const
 
void setN (size_t N)
 
virtual void setObjectiveFunction (const base::ScalarFunction &f)
 
virtual void setObjectiveGradient (const base::ScalarFunctionGradient *fGradient)
 
virtual void setObjectiveHessian (const base::ScalarFunctionHessian *fHessian)
 
void setStartingPoint (const base::DataVector &startingPoint)
 
 UnconstrainedOptimizer (const base::ScalarFunction &f, const base::ScalarFunctionGradient *fGradient, const base::ScalarFunctionHessian *fHessian, size_t N=DEFAULT_N)
 Constructor.
 
 UnconstrainedOptimizer (const UnconstrainedOptimizer &other)
 Copy constructor.
 
virtual ~UnconstrainedOptimizer ()
 Destructor.
 

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 Public Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
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::SLESolversleSolver
 linear solver
 
double theta
 tolerance
 
- Protected Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
std::unique_ptr< base::ScalarFunctionf
 objective function
 
std::unique_ptr< base::ScalarFunctionGradientfGradient
 objective function gradient
 
std::unique_ptr< base::ScalarFunctionHessianfHessian
 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)
 

Detailed Description

Newton method with adaptive step size.

Constructor & Destructor Documentation

◆ AdaptiveNewton() [1/3]

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.

Parameters
fobjective function
fHessianobjective function Hessian
maxItCountmaximal number of function evaluations
tolerancetolerance
stepSizeIncreaseFactorstep size increase factor
stepSizeDecreaseFactorstep size decrease factor
dampingIncreaseFactordamping increase factor
dampingDecreaseFactordamping decrease factor
lineSearchAccuracyline search accuracy

◆ AdaptiveNewton() [2/3]

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!

Parameters
fobjective function
fHessianobjective function Hessian
maxItCountmaximal number of function evaluations
tolerancetolerance
stepSizeIncreaseFactorstep size increase factor
stepSizeDecreaseFactorstep size decrease factor
dampingIncreaseFactordamping increase factor
dampingDecreaseFactordamping decrease factor
lineSearchAccuracyline search accuracy
sleSolverreference to linear solver for solving the linear systems (Hessian as coefficient matrix)

◆ AdaptiveNewton() [3/3]

sgpp::optimization::optimizer::AdaptiveNewton::AdaptiveNewton ( const AdaptiveNewton other)

Copy constructor.

Parameters
otheroptimizer to be copied

◆ ~AdaptiveNewton()

sgpp::optimization::optimizer::AdaptiveNewton::~AdaptiveNewton ( )
override

Destructor.

Member Function Documentation

◆ clone()

void sgpp::optimization::optimizer::AdaptiveNewton::clone ( std::unique_ptr< UnconstrainedOptimizer > &  clone) const
overridevirtual
Parameters
[out]clonepointer to cloned object

Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.

References clone().

Referenced by clone().

◆ getDampingDecreaseFactor()

double sgpp::optimization::optimizer::AdaptiveNewton::getDampingDecreaseFactor ( ) const
Returns
damping decrease factor

References rhoLambdaMinus.

◆ getDampingIncreaseFactor()

double sgpp::optimization::optimizer::AdaptiveNewton::getDampingIncreaseFactor ( ) const
Returns
damping increase factor

References rhoLambdaPlus.

◆ getLineSearchAccuracy()

double sgpp::optimization::optimizer::AdaptiveNewton::getLineSearchAccuracy ( ) const
Returns
line search accuracy

References rhoLs.

◆ getStepSizeDecreaseFactor()

double sgpp::optimization::optimizer::AdaptiveNewton::getStepSizeDecreaseFactor ( ) const
Returns
step size decrease factor

References rhoAlphaMinus.

◆ getStepSizeIncreaseFactor()

double sgpp::optimization::optimizer::AdaptiveNewton::getStepSizeIncreaseFactor ( ) const
Returns
step size increase factor

References rhoAlphaPlus.

◆ getTolerance()

double sgpp::optimization::optimizer::AdaptiveNewton::getTolerance ( ) const
Returns
tolerance

References theta.

◆ optimize()

◆ setDampingDecreaseFactor()

void sgpp::optimization::optimizer::AdaptiveNewton::setDampingDecreaseFactor ( double  dampingDecreaseFactor)
Parameters
dampingDecreaseFactordamping decrease factor

References rhoLambdaMinus.

◆ setDampingIncreaseFactor()

void sgpp::optimization::optimizer::AdaptiveNewton::setDampingIncreaseFactor ( double  dampingIncreaseFactor)
Parameters
dampingIncreaseFactordamping increase factor

References rhoLambdaPlus.

◆ setLineSearchAccuracy()

void sgpp::optimization::optimizer::AdaptiveNewton::setLineSearchAccuracy ( double  lineSearchAccuracy)
Parameters
lineSearchAccuracyline search accuracy

References rhoLs.

◆ setStepSizeDecreaseFactor()

void sgpp::optimization::optimizer::AdaptiveNewton::setStepSizeDecreaseFactor ( double  stepSizeDecreaseFactor)
Parameters
stepSizeDecreaseFactorstep size decrease factor

References rhoAlphaMinus.

◆ setStepSizeIncreaseFactor()

void sgpp::optimization::optimizer::AdaptiveNewton::setStepSizeIncreaseFactor ( double  stepSizeIncreaseFactor)
Parameters
stepSizeIncreaseFactorstep size increase factor

References rhoAlphaPlus.

◆ setTolerance()

void sgpp::optimization::optimizer::AdaptiveNewton::setTolerance ( double  tolerance)
Parameters
tolerancetolerance

References theta.

Member Data Documentation

◆ DEFAULT_DAMPING_DECREASE_FACTOR

constexpr double sgpp::optimization::optimizer::AdaptiveNewton::DEFAULT_DAMPING_DECREASE_FACTOR = 0.5
staticconstexpr

default damping decrease factor

◆ DEFAULT_DAMPING_INCREASE_FACTOR

constexpr double sgpp::optimization::optimizer::AdaptiveNewton::DEFAULT_DAMPING_INCREASE_FACTOR = 1.0
staticconstexpr

default damping increase factor

◆ DEFAULT_LINE_SEARCH_ACCURACY

constexpr double sgpp::optimization::optimizer::AdaptiveNewton::DEFAULT_LINE_SEARCH_ACCURACY = 0.01
staticconstexpr

default line search accuracy

◆ DEFAULT_STEP_SIZE_DECREASE_FACTOR

constexpr double sgpp::optimization::optimizer::AdaptiveNewton::DEFAULT_STEP_SIZE_DECREASE_FACTOR = 0.5
staticconstexpr

default step size decrease factor

◆ DEFAULT_STEP_SIZE_INCREASE_FACTOR

constexpr double sgpp::optimization::optimizer::AdaptiveNewton::DEFAULT_STEP_SIZE_INCREASE_FACTOR = 1.2
staticconstexpr

default step size increase factor

◆ DEFAULT_TOLERANCE

constexpr double sgpp::optimization::optimizer::AdaptiveNewton::DEFAULT_TOLERANCE = 1e-6
staticconstexpr

default tolerance

◆ defaultSleSolver

const base::sle_solver::GaussianElimination sgpp::optimization::optimizer::AdaptiveNewton::defaultSleSolver
protected

default linear solver

◆ rhoAlphaMinus

double sgpp::optimization::optimizer::AdaptiveNewton::rhoAlphaMinus
protected

step size decrease factor

Referenced by getStepSizeDecreaseFactor(), optimize(), and setStepSizeDecreaseFactor().

◆ rhoAlphaPlus

double sgpp::optimization::optimizer::AdaptiveNewton::rhoAlphaPlus
protected

step size increase factor

Referenced by getStepSizeIncreaseFactor(), optimize(), and setStepSizeIncreaseFactor().

◆ rhoLambdaMinus

double sgpp::optimization::optimizer::AdaptiveNewton::rhoLambdaMinus
protected

damping decrease factor

Referenced by getDampingDecreaseFactor(), optimize(), and setDampingDecreaseFactor().

◆ rhoLambdaPlus

double sgpp::optimization::optimizer::AdaptiveNewton::rhoLambdaPlus
protected

damping increase factor

Referenced by getDampingIncreaseFactor(), optimize(), and setDampingIncreaseFactor().

◆ rhoLs

double sgpp::optimization::optimizer::AdaptiveNewton::rhoLs
protected

line search accuracy

Referenced by getLineSearchAccuracy(), optimize(), and setLineSearchAccuracy().

◆ sleSolver

const base::sle_solver::SLESolver& sgpp::optimization::optimizer::AdaptiveNewton::sleSolver
protected

linear solver

Referenced by optimize().

◆ theta

double sgpp::optimization::optimizer::AdaptiveNewton::theta
protected

tolerance

Referenced by getTolerance(), optimize(), and setTolerance().


The documentation for this class was generated from the following files: