SG++-Doxygen-Documentation
sgpp::optimization::optimizer::BFGS Class Reference

BFGS method for unconstrained optimization. More...

#include <BFGS.hpp>

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

Public Member Functions

 BFGS (const ScalarFunction &f, const ScalarFunctionGradient &fGradient, size_t maxItCount=DEFAULT_N, double tolerance=DEFAULT_TOLERANCE, double stepSizeIncreaseFactor=DEFAULT_STEP_SIZE_INCREASE_FACTOR, double stepSizeDecreaseFactor=DEFAULT_STEP_SIZE_DECREASE_FACTOR, double lineSearchAccuracy=DEFAULT_LINE_SEARCH_ACCURACY)
 Constructor. More...
 
 BFGS (const BFGS &other)
 Copy constructor. More...
 
void clone (std::unique_ptr< UnconstrainedOptimizer > &clone) const override
 
double getLineSearchAccuracy () const
 
ScalarFunctionGradientgetObjectiveGradient () const
 
double getStepSizeDecreaseFactor () const
 
double getStepSizeIncreaseFactor () const
 
double getTolerance () const
 
void optimize () override
 Pure virtual method for optimization of the objective function. More...
 
void setLineSearchAccuracy (double lineSearchAccuracy)
 
void setStepSizeDecreaseFactor (double stepSizeDecreaseFactor)
 
void setStepSizeIncreaseFactor (double stepSizeIncreaseFactor)
 
void setTolerance (double tolerance)
 
 ~BFGS () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
const base::DataMatrixgetHistoryOfOptimalPoints () const
 
const base::DataVectorgetHistoryOfOptimalValues () const
 
size_t getN () const
 
ScalarFunctiongetObjectiveFunction () const
 
const base::DataVectorgetOptimalPoint () const
 
double getOptimalValue () const
 
const base::DataVectorgetStartingPoint () 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_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

std::unique_ptr< ScalarFunctionGradientfGradient
 objective function gradient More...
 
double rhoAlphaMinus
 step size decrease factor More...
 
double rhoAlphaPlus
 step size increase factor More...
 
double rhoLs
 line search accuracy More...
 
double theta
 tolerance More...
 
- Protected Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
std::unique_ptr< ScalarFunctionf
 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...
 

Detailed Description

BFGS method for unconstrained optimization.

Constructor & Destructor Documentation

sgpp::optimization::optimizer::BFGS::BFGS ( const ScalarFunction f,
const ScalarFunctionGradient fGradient,
size_t  maxItCount = DEFAULT_N,
double  tolerance = DEFAULT_TOLERANCE,
double  stepSizeIncreaseFactor = DEFAULT_STEP_SIZE_INCREASE_FACTOR,
double  stepSizeDecreaseFactor = DEFAULT_STEP_SIZE_DECREASE_FACTOR,
double  lineSearchAccuracy = DEFAULT_LINE_SEARCH_ACCURACY 
)

Constructor.

Parameters
fobjective function
fGradientobjective function gradient
maxItCountmaximal number of function evaluations
tolerancetolerance
stepSizeIncreaseFactorstep size increase factor
stepSizeDecreaseFactorstep size decrease factor
lineSearchAccuracyline search accuracy

References sgpp::optimization::ScalarFunctionGradient::clone().

Referenced by clone().

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

Copy constructor.

Parameters
otheroptimizer to be copied

References fGradient.

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

Destructor.

Member Function Documentation

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

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

References BFGS().

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

References rhoLs.

ScalarFunctionGradient & sgpp::optimization::optimizer::BFGS::getObjectiveGradient ( ) const
Returns
objective function gradient

References fGradient.

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

References rhoAlphaMinus.

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

References rhoAlphaPlus.

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

References theta.

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

References rhoLs.

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

References rhoAlphaMinus.

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

References rhoAlphaPlus.

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

References theta.

Member Data Documentation

constexpr double sgpp::optimization::optimizer::BFGS::DEFAULT_LINE_SEARCH_ACCURACY = 0.01
static

default line search accuracy

constexpr double sgpp::optimization::optimizer::BFGS::DEFAULT_STEP_SIZE_DECREASE_FACTOR = 0.5
static

default step size decrease factor

constexpr double sgpp::optimization::optimizer::BFGS::DEFAULT_STEP_SIZE_INCREASE_FACTOR = 1.2
static

default step size increase factor

constexpr double sgpp::optimization::optimizer::BFGS::DEFAULT_TOLERANCE = 1e-6
static

default tolerance

std::unique_ptr<ScalarFunctionGradient> sgpp::optimization::optimizer::BFGS::fGradient
protected

objective function gradient

Referenced by BFGS(), getObjectiveGradient(), and optimize().

double sgpp::optimization::optimizer::BFGS::rhoAlphaMinus
protected

step size decrease factor

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

double sgpp::optimization::optimizer::BFGS::rhoAlphaPlus
protected

step size increase factor

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

double sgpp::optimization::optimizer::BFGS::rhoLs
protected

line search accuracy

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

double sgpp::optimization::optimizer::BFGS::theta
protected

tolerance

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


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