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

◆ LevenbergMarquardt() [1/3]

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().

◆ LevenbergMarquardt() [2/3]

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().

◆ LevenbergMarquardt() [3/3]

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

Copy constructor.

Parameters
otheroptimizer to be copied

References phiGradient.

◆ ~LevenbergMarquardt()

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

Destructor.

Member Function Documentation

◆ clone()

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().

◆ getAcceptanceThreshold()

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

References beta0.

◆ getEffectivenessThreshold()

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

References beta1.

◆ getInitialDamping()

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

References mu0.

◆ getPhiGradient()

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

References phiGradient.

◆ getTolerance()

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

References tol.

◆ optimize()

void sgpp::optimization::optimizer::LevenbergMarquardt::optimize ( )
overridevirtual

◆ setAcceptanceThreshold()

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

References beta0.

◆ setEffectivenessThreshold()

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

References beta1.

◆ setInitialDamping()

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

References mu0.

◆ setTolerance()

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

References tol.

Member Data Documentation

◆ beta0

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

acceptance threshold

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

◆ beta1

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

effectiveness threshold

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

◆ DEFAULT_ACCEPTANCE_THRESHOLD

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

default acceptance threshold

◆ DEFAULT_EFFECTIVENESS_THRESHOLD

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

default effectiveness threshold

◆ DEFAULT_INITIAL_DAMPING

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

default initial damping

◆ DEFAULT_TOLERANCE

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

default tolerance

◆ defaultSleSolver

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

default linear solver

◆ mu0

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

initial damping

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

◆ phiGradient

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

phi gradient

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

◆ sleSolver

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

linear solver

Referenced by optimize().

◆ tol

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: