![]()  | 
  
    SG++-Doxygen-Documentation
    
   | 
 
Levenberg-Marquardt algorithm for least squares optimization. More...
#include <LevenbergMarquardt.hpp>
  
 Public Member Functions | |
| void | clone (std::unique_ptr< LeastSquaresOptimizer > &clone) const override | 
| double | getAcceptanceThreshold () const | 
| double | getEffectivenessThreshold () const | 
| double | getInitialDamping () const | 
| VectorFunctionGradient & | getPhiGradient () 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::DataMatrix & | getHistoryOfOptimalPoints () const | 
| const base::DataVector & | getHistoryOfOptimalValues () const | 
| size_t | getN () const | 
| const base::DataVector & | getOptimalPoint () const | 
| double | getOptimalValue () const | 
| VectorFunction & | getPhiFunction () const | 
| const base::DataVector & | getStartingPoint () 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< VectorFunctionGradient > | phiGradient | 
| phi gradient  More... | |
| const sle_solver::SLESolver & | sleSolver | 
| 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< VectorFunction > | phi | 
| 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... | |
Levenberg-Marquardt algorithm for least squares optimization.
| 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.
| phi | base function | 
| phiGradient | Jacobian of phi | 
| maxItCount | maximal number of function evaluations | 
| tolerance | tolerance | 
| initialDamping | initial damping | 
| acceptanceThreshold | acceptance threshold | 
| effectivenessThreshold | effectiveness 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!
| phi | phi function | 
| phiGradient | Jacobian of phi | 
| maxItCount | maximal number of function evaluations | 
| tolerance | tolerance | 
| initialDamping | initial damping | 
| acceptanceThreshold | acceptance threshold | 
| effectivenessThreshold | effectiveness threshold | 
| sleSolver | reference to linear solver for solving the linear systems | 
References sgpp::optimization::VectorFunctionGradient::clone().
| sgpp::optimization::optimizer::LevenbergMarquardt::LevenbergMarquardt | ( | const LevenbergMarquardt & | other | ) | 
      
  | 
  override | 
Destructor.
      
  | 
  overridevirtual | 
| [out] | clone | pointer to cloned object | 
Implements sgpp::optimization::optimizer::LeastSquaresOptimizer.
References LevenbergMarquardt().
| double sgpp::optimization::optimizer::LevenbergMarquardt::getAcceptanceThreshold | ( | ) | const | 
References beta0.
| double sgpp::optimization::optimizer::LevenbergMarquardt::getEffectivenessThreshold | ( | ) | const | 
References beta1.
| double sgpp::optimization::optimizer::LevenbergMarquardt::getInitialDamping | ( | ) | const | 
References mu0.
| VectorFunctionGradient & sgpp::optimization::optimizer::LevenbergMarquardt::getPhiGradient | ( | ) | const | 
References phiGradient.
| double sgpp::optimization::optimizer::LevenbergMarquardt::getTolerance | ( | ) | const | 
References tol.
      
  | 
  overridevirtual | 
Pure virtual method for optimization of the objective function.
The result of the optimization process can be obtained by member functions, e.g., getOptimalPoint() and getOptimalValue().
Implements sgpp::optimization::optimizer::LeastSquaresOptimizer.
References sgpp::base::DataVector::append(), sgpp::base::DataMatrix::appendRow(), chess::b, beta0, beta1, sgpp::optimization::Printer::disableStatusPrinting(), sgpp::optimization::Printer::enableStatusPrinting(), sgpp::optimization::optimizer::LeastSquaresOptimizer::fHist, sgpp::optimization::optimizer::LeastSquaresOptimizer::fOpt, sgpp::optimization::Printer::getInstance(), python.statsfileInfo::i, sgpp::optimization::Printer::isStatusPrintingEnabled(), sgpp::base::DataVector::l2Norm(), m, mu, mu0, sgpp::base::DataVector::mult(), sgpp::base::DataMatrix::mult(), sgpp::optimization::optimizer::LeastSquaresOptimizer::N, sgpp::optimization::optimizer::LeastSquaresOptimizer::phi, phiGradient, sgpp::combigrid::pow(), sgpp::optimization::Printer::printStatusBegin(), sgpp::optimization::Printer::printStatusEnd(), sgpp::optimization::Printer::printStatusUpdate(), sgpp::base::DataMatrix::resize(), create_scripts::s, sleSolver, sgpp::optimization::sle_solver::SLESolver::solve(), tol, sgpp::base::DataVector::toString(), sgpp::optimization::optimizer::LeastSquaresOptimizer::x0, sgpp::optimization::optimizer::LeastSquaresOptimizer::xHist, and sgpp::optimization::optimizer::LeastSquaresOptimizer::xOpt.
| void sgpp::optimization::optimizer::LevenbergMarquardt::setAcceptanceThreshold | ( | double | acceptanceThreshold | ) | 
| acceptanceThreshold | acceptance threshold | 
References beta0.
| void sgpp::optimization::optimizer::LevenbergMarquardt::setEffectivenessThreshold | ( | double | effectivenessThreshold | ) | 
| effectivenessThreshold | effectiveness threshold | 
References beta1.
| void sgpp::optimization::optimizer::LevenbergMarquardt::setInitialDamping | ( | double | initialDamping | ) | 
| initialDamping | initial damping | 
References mu0.
| void sgpp::optimization::optimizer::LevenbergMarquardt::setTolerance | ( | double | tolerance | ) | 
| tolerance | tolerance | 
References tol.
      
  | 
  protected | 
acceptance threshold
Referenced by getAcceptanceThreshold(), optimize(), and setAcceptanceThreshold().
      
  | 
  protected | 
effectiveness threshold
Referenced by getEffectivenessThreshold(), optimize(), and setEffectivenessThreshold().
      
  | 
  static | 
default acceptance threshold
      
  | 
  static | 
default effectiveness threshold
      
  | 
  static | 
default initial damping
      
  | 
  static | 
default tolerance
      
  | 
  protected | 
default linear solver
      
  | 
  protected | 
initial damping
Referenced by getInitialDamping(), optimize(), and setInitialDamping().
      
  | 
  protected | 
phi gradient
Referenced by getPhiGradient(), LevenbergMarquardt(), and optimize().
      
  | 
  protected | 
linear solver
Referenced by optimize().
      
  | 
  protected | 
tolerance
Referenced by getTolerance(), optimize(), and setTolerance().