SG++-Doxygen-Documentation
sgpp::optimization::optimizer::UnconstrainedOptimizer Class Referenceabstract

Abstract class for optimizing objective functions. More...

#include <UnconstrainedOptimizer.hpp>

Inheritance diagram for sgpp::optimization::optimizer::UnconstrainedOptimizer:
sgpp::optimization::optimizer::AdaptiveGradientDescent sgpp::optimization::optimizer::AdaptiveNewton sgpp::optimization::optimizer::BFGS sgpp::optimization::optimizer::CMAES sgpp::optimization::optimizer::ConstrainedOptimizer sgpp::optimization::optimizer::DifferentialEvolution sgpp::optimization::optimizer::GradientDescent sgpp::optimization::optimizer::MultiStart sgpp::optimization::optimizer::NelderMead sgpp::optimization::optimizer::Newton sgpp::optimization::optimizer::NLCG sgpp::optimization::optimizer::Rprop

Public Member Functions

virtual void clone (std::unique_ptr< UnconstrainedOptimizer > &clone) const =0
 Pure virtual method for cloning the optimizer. More...
 
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
 
virtual void optimize ()=0
 Pure virtual method for optimization of the objective function. More...
 
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 const size_t DEFAULT_N = 1000
 default maximal number of iterations or function evaluations More...
 

Protected Attributes

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

Abstract class for optimizing objective functions.

Constructor & Destructor Documentation

◆ UnconstrainedOptimizer() [1/2]

sgpp::optimization::optimizer::UnconstrainedOptimizer::UnconstrainedOptimizer ( const ScalarFunction f,
size_t  N = DEFAULT_N 
)
inlineexplicit

Constructor.

The starting point is set to \((0.5, \dotsc, 0.5)^{\mathrm{T}}\).

Parameters
ffunction to optimize
Nmaximal number of iterations or function evaluations (depending on the implementation)

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

◆ UnconstrainedOptimizer() [2/2]

sgpp::optimization::optimizer::UnconstrainedOptimizer::UnconstrainedOptimizer ( const UnconstrainedOptimizer other)
inline

Copy constructor.

Parameters
otheroptimizer to be copied

References fHist, fOpt, x0, xHist, and xOpt.

◆ ~UnconstrainedOptimizer()

virtual sgpp::optimization::optimizer::UnconstrainedOptimizer::~UnconstrainedOptimizer ( )
inlinevirtual

Destructor.

References optimize().

Member Function Documentation

◆ clone()

◆ getHistoryOfOptimalPoints()

const base::DataMatrix& sgpp::optimization::optimizer::UnconstrainedOptimizer::getHistoryOfOptimalPoints ( ) const
inline
Returns
tall matrix (d columns) in which the k-th row indicates the best point after k iterations of the optimization, empty matrix on error or if not supported

References xHist.

Referenced by sgpp::optimization::optimizer::LogBarrier::optimize(), sgpp::optimization::optimizer::MultiStart::optimize(), sgpp::optimization::optimizer::SquaredPenalty::optimize(), and sgpp::optimization::optimizer::AugmentedLagrangian::optimize().

◆ getHistoryOfOptimalValues()

const base::DataVector& sgpp::optimization::optimizer::UnconstrainedOptimizer::getHistoryOfOptimalValues ( ) const
inline
Returns
vector in which the k-th entry indicates the best function value after k iterations of the optimization, empty vector on error or if not supported

References clone(), and fHist.

◆ getN()

size_t sgpp::optimization::optimizer::UnconstrainedOptimizer::getN ( ) const
inline
Returns
maximal number of iterations or function evaluations

References N.

◆ getObjectiveFunction()

ScalarFunction& sgpp::optimization::optimizer::UnconstrainedOptimizer::getObjectiveFunction ( ) const
inline
Returns
objective function

References f.

◆ getOptimalPoint()

const base::DataVector& sgpp::optimization::optimizer::UnconstrainedOptimizer::getOptimalPoint ( ) const
inline
Returns
result of optimization (location of optimum), empty vector on error

References xOpt.

Referenced by sgpp::datadriven::OperationInverseRosenblattTransformation1DBspline::doTransformation1D(), sgpp::datadriven::OperationInverseRosenblattTransformation1DBsplineBoundary::doTransformation1D(), sgpp::datadriven::OperationInverseRosenblattTransformation1DModPoly::doTransformation1D(), sgpp::datadriven::OperationInverseRosenblattTransformation1DPoly::doTransformation1D(), sgpp::datadriven::OperationInverseRosenblattTransformation1DPolyBoundary::doTransformation1D(), sgpp::datadriven::OperationInverseRosenblattTransformation1DModBspline::doTransformation1D(), sgpp::datadriven::OperationInverseRosenblattTransformation1DModPolyClenshawCurtis::doTransformation1D(), sgpp::datadriven::OperationInverseRosenblattTransformation1DBsplineClenshawCurtis::doTransformation1D(), sgpp::datadriven::OperationInverseRosenblattTransformation1DPolyClenshawCurtis::doTransformation1D(), sgpp::datadriven::OperationInverseRosenblattTransformation1DPolyClenshawCurtisBoundary::doTransformation1D(), sgpp::datadriven::OperationInverseRosenblattTransformation1DModBsplineClenshawCurtis::doTransformation1D(), sgpp::optimization::optimizer::AugmentedLagrangian::findFeasiblePoint(), sgpp::datadriven::BayesianOptimization::main(), sgpp::optimization::optimizer::LogBarrier::optimize(), sgpp::optimization::optimizer::MultiStart::optimize(), sgpp::optimization::optimizer::SquaredPenalty::optimize(), sgpp::optimization::optimizer::AugmentedLagrangian::optimize(), and sgpp::datadriven::MaximumLikelihoodCrossValidation::optimizeBandwidths().

◆ getOptimalValue()

double sgpp::optimization::optimizer::UnconstrainedOptimizer::getOptimalValue ( ) const
inline
Returns
result of optimization (optimal function value), NAN on error

References fOpt.

Referenced by sgpp::datadriven::BayesianOptimization::main(), and sgpp::optimization::optimizer::MultiStart::optimize().

◆ getStartingPoint()

const base::DataVector& sgpp::optimization::optimizer::UnconstrainedOptimizer::getStartingPoint ( ) const
inline
Returns
starting point

References x0.

◆ optimize()

◆ setN()

void sgpp::optimization::optimizer::UnconstrainedOptimizer::setN ( size_t  N)
inline
Parameters
Nmaximal number of iterations or function evaluations

References N.

Referenced by sgpp::optimization::optimizer::MultiStart::optimize().

◆ setStartingPoint()

Member Data Documentation

◆ DEFAULT_N

const size_t sgpp::optimization::optimizer::UnconstrainedOptimizer::DEFAULT_N = 1000
static

default maximal number of iterations or function evaluations

◆ f

◆ fHist

◆ fOpt

◆ N

◆ x0

◆ xHist

◆ xOpt


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