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

Levenberg-Marquardt algorithm for least squares optimization. More...

#include <LevenbergMarquardt.hpp>

Inheritance diagram for sgpp::optimization::optimizer::LevenbergMarquardt:
sgpp::optimization::optimizer::LeastSquaresOptimizer

Public Member Functions

void clone (std::unique_ptr< LeastSquaresOptimizer > &clone) const override
 
double getAcceptanceThreshold () const
 
double getEffectivenessThreshold () const
 
double getInitialDamping () const
 
VectorFunctionGradientgetPhiGradient () const
 
double getTolerance () const
 
 LevenbergMarquardt (const VectorFunction &phi, const VectorFunctionGradient &phiGradient, size_t maxItCount=DEFAULT_N, double tolerance=DEFAULT_TOLERANCE, double initialDamping=DEFAULT_INITIAL_DAMPING, double acceptanceThreshold=DEFAULT_ACCEPTANCE_THRESHOLD, double effectivenessThreshold=DEFAULT_EFFECTIVENESS_THRESHOLD)
 Constructor. More...
 
 LevenbergMarquardt (const VectorFunction &phi, const VectorFunctionGradient &phiGradient, size_t maxItCount, double tolerance, double initialDamping, double acceptanceThreshold, double effectivenessThreshold, const sle_solver::SLESolver &sleSolver)
 Constructor. More...
 
 LevenbergMarquardt (const LevenbergMarquardt &other)
 Copy constructor. More...
 
void optimize () override
 Pure virtual method for optimization of the objective function. More...
 
void setAcceptanceThreshold (double acceptanceThreshold)
 
void setEffectivenessThreshold (double effectivenessThreshold)
 
void setInitialDamping (double initialDamping)
 
void setTolerance (double tolerance)
 
 ~LevenbergMarquardt () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::optimization::optimizer::LeastSquaresOptimizer
const base::DataMatrixgetHistoryOfOptimalPoints () const
 
const base::DataVectorgetHistoryOfOptimalValues () const
 
size_t getN () const
 
const base::DataVectorgetOptimalPoint () const
 
double getOptimalValue () const
 
VectorFunctiongetPhiFunction () const
 
const base::DataVectorgetStartingPoint () const
 
 LeastSquaresOptimizer (const VectorFunction &phi, size_t N=DEFAULT_N)
 Constructor. More...
 
 LeastSquaresOptimizer (const LeastSquaresOptimizer &other)
 Copy constructor. More...
 
void setN (size_t N)
 
void setStartingPoint (const base::DataVector &startingPoint)
 
virtual ~LeastSquaresOptimizer ()
 Destructor. More...
 

Static Public Attributes

static constexpr double DEFAULT_ACCEPTANCE_THRESHOLD = 0.3
 default acceptance threshold More...
 
static constexpr double DEFAULT_EFFECTIVENESS_THRESHOLD = 0.9
 default effectiveness threshold More...
 
static constexpr double DEFAULT_INITIAL_DAMPING = 1.0
 default initial damping More...
 
static constexpr double DEFAULT_TOLERANCE = 1e-6
 default tolerance More...
 
- Static Public Attributes inherited from sgpp::optimization::optimizer::LeastSquaresOptimizer
static const size_t DEFAULT_N = 1000
 default maximal number of iterations or function evaluations More...
 

Protected Attributes

double beta0
 acceptance threshold More...
 
double beta1
 effectiveness threshold More...
 
const sle_solver::GaussianElimination defaultSleSolver
 default linear solver More...
 
double mu0
 initial damping More...
 
std::unique_ptr< VectorFunctionGradientphiGradient
 phi gradient More...
 
const sle_solver::SLESolversleSolver
 linear solver More...
 
double tol
 tolerance More...
 
- Protected Attributes inherited from sgpp::optimization::optimizer::LeastSquaresOptimizer
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...
 
std::unique_ptr< VectorFunctionphi
 phi function 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

Levenberg-Marquardt algorithm for least squares optimization.

Constructor & Destructor Documentation

sgpp::optimization::optimizer::LevenbergMarquardt::LevenbergMarquardt ( const VectorFunction phi,
const VectorFunctionGradient phiGradient,
size_t  maxItCount = DEFAULT_N,
double  tolerance = DEFAULT_TOLERANCE,
double  initialDamping = DEFAULT_INITIAL_DAMPING,
double  acceptanceThreshold = DEFAULT_ACCEPTANCE_THRESHOLD,
double  effectivenessThreshold = DEFAULT_EFFECTIVENESS_THRESHOLD 
)

Constructor.

By default, GaussianElimination is used to solve the linear systems.

Parameters
phibase function
phiGradientJacobian of phi
maxItCountmaximal number of function evaluations
tolerancetolerance
initialDampinginitial damping
acceptanceThresholdacceptance threshold
effectivenessThresholdeffectiveness threshold

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

Referenced by clone().

sgpp::optimization::optimizer::LevenbergMarquardt::LevenbergMarquardt ( const VectorFunction phi,
const VectorFunctionGradient phiGradient,
size_t  maxItCount,
double  tolerance,
double  initialDamping,
double  acceptanceThreshold,
double  effectivenessThreshold,
const sle_solver::SLESolver sleSolver 
)

Constructor.

Do not destruct the solver before this object!

Parameters
phiphi function
phiGradientJacobian of phi
maxItCountmaximal number of function evaluations
tolerancetolerance
initialDampinginitial damping
acceptanceThresholdacceptance threshold
effectivenessThresholdeffectiveness threshold
sleSolverreference to linear solver for solving the linear systems

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

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

Copy constructor.

Parameters
otheroptimizer to be copied

References phiGradient.

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

Destructor.

Member Function Documentation

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

Implements sgpp::optimization::optimizer::LeastSquaresOptimizer.

References LevenbergMarquardt().

double sgpp::optimization::optimizer::LevenbergMarquardt::getAcceptanceThreshold ( ) const
Returns
acceptanceThreshold

References beta0.

double sgpp::optimization::optimizer::LevenbergMarquardt::getEffectivenessThreshold ( ) const
Returns
effectiveness threshold

References beta1.

double sgpp::optimization::optimizer::LevenbergMarquardt::getInitialDamping ( ) const
Returns
initial damping

References mu0.

VectorFunctionGradient & sgpp::optimization::optimizer::LevenbergMarquardt::getPhiGradient ( ) const
Returns
phi gradient

References phiGradient.

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

References tol.

void sgpp::optimization::optimizer::LevenbergMarquardt::optimize ( )
overridevirtual
void sgpp::optimization::optimizer::LevenbergMarquardt::setAcceptanceThreshold ( double  acceptanceThreshold)
Parameters
acceptanceThresholdacceptance threshold

References beta0.

void sgpp::optimization::optimizer::LevenbergMarquardt::setEffectivenessThreshold ( double  effectivenessThreshold)
Parameters
effectivenessThresholdeffectiveness threshold

References beta1.

void sgpp::optimization::optimizer::LevenbergMarquardt::setInitialDamping ( double  initialDamping)
Parameters
initialDampinginitial damping

References mu0.

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

References tol.

Member Data Documentation

double sgpp::optimization::optimizer::LevenbergMarquardt::beta0
protected

acceptance threshold

Referenced by getAcceptanceThreshold(), optimize(), and setAcceptanceThreshold().

double sgpp::optimization::optimizer::LevenbergMarquardt::beta1
protected

effectiveness threshold

Referenced by getEffectivenessThreshold(), optimize(), and setEffectivenessThreshold().

constexpr double sgpp::optimization::optimizer::LevenbergMarquardt::DEFAULT_ACCEPTANCE_THRESHOLD = 0.3
static

default acceptance threshold

constexpr double sgpp::optimization::optimizer::LevenbergMarquardt::DEFAULT_EFFECTIVENESS_THRESHOLD = 0.9
static

default effectiveness threshold

constexpr double sgpp::optimization::optimizer::LevenbergMarquardt::DEFAULT_INITIAL_DAMPING = 1.0
static

default initial damping

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

default tolerance

const sle_solver::GaussianElimination sgpp::optimization::optimizer::LevenbergMarquardt::defaultSleSolver
protected

default linear solver

double sgpp::optimization::optimizer::LevenbergMarquardt::mu0
protected

initial damping

Referenced by getInitialDamping(), optimize(), and setInitialDamping().

std::unique_ptr<VectorFunctionGradient> sgpp::optimization::optimizer::LevenbergMarquardt::phiGradient
protected

phi gradient

Referenced by getPhiGradient(), LevenbergMarquardt(), and optimize().

const sle_solver::SLESolver& sgpp::optimization::optimizer::LevenbergMarquardt::sleSolver
protected

linear solver

Referenced by optimize().

double sgpp::optimization::optimizer::LevenbergMarquardt::tol
protected

tolerance

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


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