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

Rprop method for unconstrained optimization. More...

#include <Rprop.hpp>

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

Public Member Functions

void clone (std::unique_ptr< UnconstrainedOptimizer > &clone) const override
 
double getInitialStepSize () 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...
 
 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::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_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< ScalarFunctionGradientfGradient
 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< 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

Rprop method for unconstrained optimization.

Constructor & Destructor Documentation

◆ Rprop() [1/2]

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.

Parameters
fobjective function
fGradientobjective function gradient
maxItCountmaximal number of function evaluations
tolerancetolerance
initialStepSizeinitial step size
stepSizeIncreaseFactorstep size increase factor
stepSizeDecreaseFactorstep size decrease factor

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

Referenced by clone().

◆ Rprop() [2/2]

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

Copy constructor.

Parameters
otheroptimizer to be copied

References fGradient.

◆ ~Rprop()

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

Destructor.

Member Function Documentation

◆ clone()

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

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

References Rprop().

◆ getInitialStepSize()

double sgpp::optimization::optimizer::Rprop::getInitialStepSize ( ) const
Returns
initial step size

References initialAlpha.

◆ getObjectiveGradient()

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

References fGradient.

◆ getStepSizeDecreaseFactor()

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

References rhoAlphaMinus.

◆ getStepSizeIncreaseFactor()

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

References rhoAlphaPlus.

◆ getTolerance()

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

References theta.

◆ optimize()

◆ setInitialStepSize()

void sgpp::optimization::optimizer::Rprop::setInitialStepSize ( double  initialStepSize)
Parameters
initialStepSizeinitial step size

References initialAlpha.

◆ setStepSizeDecreaseFactor()

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

References rhoAlphaMinus.

◆ setStepSizeIncreaseFactor()

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

References rhoAlphaPlus.

◆ setTolerance()

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

References theta.

Member Data Documentation

◆ DEFAULT_INITIAL_STEP_SIZE

constexpr double sgpp::optimization::optimizer::Rprop::DEFAULT_INITIAL_STEP_SIZE = 0.01
static

default initial step size

◆ DEFAULT_STEP_SIZE_DECREASE_FACTOR

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

default step size decrease factor

◆ DEFAULT_STEP_SIZE_INCREASE_FACTOR

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

default step size increase factor

◆ DEFAULT_TOLERANCE

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

default tolerance

◆ fGradient

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

objective function gradient

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

◆ initialAlpha

double sgpp::optimization::optimizer::Rprop::initialAlpha
protected

initial step size

Referenced by getInitialStepSize(), optimize(), and setInitialStepSize().

◆ rhoAlphaMinus

double sgpp::optimization::optimizer::Rprop::rhoAlphaMinus
protected

step size decrease factor

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

◆ rhoAlphaPlus

double sgpp::optimization::optimizer::Rprop::rhoAlphaPlus
protected

step size increase factor

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

◆ theta

double sgpp::optimization::optimizer::Rprop::theta
protected

tolerance

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


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