Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
gtsam::LevenbergMarquardtParams Class Reference

#include <LevenbergMarquardtParams.h>

Inheritance diagram for gtsam::LevenbergMarquardtParams:
Inheritance graph
[legend]

Public Types

using OptimizerType = LevenbergMarquardtOptimizer
 
enum  VerbosityLM {
  SILENT = 0, SUMMARY, TERMINATION, LAMBDA,
  TRYLAMBDA, TRYCONFIG, DAMPED, TRYDELTA
}
 
- Public Types inherited from gtsam::NonlinearOptimizerParams
using IterationHook = std::function< void(size_t, double, double)>
 
enum  LinearSolverType {
  MULTIFRONTAL_CHOLESKY, MULTIFRONTAL_QR, SEQUENTIAL_CHOLESKY, SEQUENTIAL_QR,
  Iterative, CHOLMOD
}
 
enum  Verbosity {
  SILENT, TERMINATION, ERROR, VALUES,
  DELTA, LINEAR
}
 

Public Member Functions

 LevenbergMarquardtParams ()
 
void print (const std::string &str="") const override
 
 ~LevenbergMarquardtParams () override
 
Getters/Setters, mainly for wrappers. Use fields above in C++.
bool getDiagonalDamping () const
 
double getlambdaFactor () const
 
double getlambdaInitial () const
 
double getlambdaLowerBound () const
 
double getlambdaUpperBound () const
 
bool getUseFixedLambdaFactor ()
 
std::string getLogFile () const
 
std::string getVerbosityLM () const
 
void setDiagonalDamping (bool flag)
 
void setlambdaFactor (double value)
 
void setlambdaInitial (double value)
 
void setlambdaLowerBound (double value)
 
void setlambdaUpperBound (double value)
 
void setUseFixedLambdaFactor (bool flag)
 
void setLogFile (const std::string &s)
 
void setVerbosityLM (const std::string &s)
 
Clone
boost::shared_ptr< NonlinearOptimizerParamsclone () const
 
- Public Member Functions inherited from gtsam::NonlinearOptimizerParams
bool equals (const NonlinearOptimizerParams &other, double tol=1e-9) const
 
double getAbsoluteErrorTol () const
 
GaussianFactorGraph::Eliminate getEliminationFunction () const
 
double getErrorTol () const
 
std::string getLinearSolverType () const
 
size_t getMaxIterations () const
 
std::string getOrderingType () const
 
double getRelativeErrorTol () const
 
std::string getVerbosity () const
 
bool isCholmod () const
 
bool isIterative () const
 
bool isMultifrontal () const
 
bool isSequential () const
 
 NonlinearOptimizerParams ()=default
 
void setAbsoluteErrorTol (double value)
 
void setErrorTol (double value)
 
void setIterativeParams (const boost::shared_ptr< IterativeOptimizationParameters > params)
 
void setLinearSolverType (const std::string &solver)
 
void setMaxIterations (int value)
 
void setOrdering (const Ordering &ordering)
 
void setOrderingType (const std::string &ordering)
 
void setRelativeErrorTol (double value)
 
void setVerbosity (const std::string &src)
 
virtual ~NonlinearOptimizerParams ()
 

Static Public Member Functions

static LevenbergMarquardtParams CeresDefaults ()
 
static LevenbergMarquardtParams EnsureHasOrdering (LevenbergMarquardtParams params, const NonlinearFactorGraph &graph)
 
static LevenbergMarquardtParams LegacyDefaults ()
 
static LevenbergMarquardtParams ReplaceOrdering (LevenbergMarquardtParams params, const Ordering &ordering)
 
static void SetCeresDefaults (LevenbergMarquardtParams *p)
 
static void SetLegacyDefaults (LevenbergMarquardtParams *p)
 
static VerbosityLM verbosityLMTranslator (const std::string &s)
 
static std::string verbosityLMTranslator (VerbosityLM value)
 
- Static Public Member Functions inherited from gtsam::NonlinearOptimizerParams
static Verbosity verbosityTranslator (const std::string &s)
 
static std::string verbosityTranslator (Verbosity value)
 

Public Attributes

bool diagonalDamping
 if true, use diagonal of Hessian More...
 
double lambdaFactor
 The amount by which to multiply or divide lambda when adjusting lambda (default: 10.0) More...
 
double lambdaInitial
 The initial Levenberg-Marquardt damping term (default: 1e-5) More...
 
double lambdaLowerBound
 The minimum lambda used in LM (default: 0) More...
 
double lambdaUpperBound
 The maximum lambda to try before assuming the optimization has failed (default: 1e5) More...
 
std::string logFile
 an optional CSV log file, with [iteration, time, error, lambda] More...
 
double maxDiagonal
 when using diagonal damping saturates the maximum diagonal entries (default: 1e32) More...
 
double minDiagonal
 when using diagonal damping saturates the minimum diagonal entries (default: 1e-6) More...
 
double minModelFidelity
 Lower bound for the modelFidelity to accept the result of an LM iteration. More...
 
bool useFixedLambdaFactor
 if true applies constant increase (or decrease) to lambda according to lambdaFactor More...
 
VerbosityLM verbosityLM
 The verbosity level for Levenberg-Marquardt (default: SILENT), see also NonlinearOptimizerParams::verbosity. More...
 
- Public Attributes inherited from gtsam::NonlinearOptimizerParams
double absoluteErrorTol = 1e-5
 The maximum absolute error decrease to stop iterating (default 1e-5) More...
 
double errorTol = 0.0
 The maximum total error to stop iterating (default 0.0) More...
 
IterationHook iterationHook
 
IterativeOptimizationParameters::shared_ptr iterativeParams
 The container for iterativeOptimization parameters. used in CG Solvers. More...
 
LinearSolverType linearSolverType = MULTIFRONTAL_CHOLESKY
 The type of linear solver to use in the nonlinear optimizer. More...
 
size_t maxIterations = 100
 The maximum iterations to stop iterating (default 100) More...
 
boost::optional< Orderingordering
 The optional variable elimination ordering, or empty to use COLAMD (default: empty) More...
 
Ordering::OrderingType orderingType = Ordering::COLAMD
 The method of ordering use during variable elimination (default COLAMD) More...
 
double relativeErrorTol = 1e-5
 The maximum relative error decrease to stop iterating (default 1e-5) More...
 
Verbosity verbosity = SILENT
 The printing verbosity during optimization (default SILENT) More...
 

Detailed Description

Parameters for Levenberg-Marquardt optimization. Note that this parameters class inherits from NonlinearOptimizerParams, which specifies the parameters common to all nonlinear optimization algorithms. This class also contains all of those parameters.

Definition at line 35 of file LevenbergMarquardtParams.h.

Member Typedef Documentation

Definition at line 45 of file LevenbergMarquardtParams.h.

Member Enumeration Documentation

See LevenbergMarquardtParams::lmVerbosity

Enumerator
SILENT 
SUMMARY 
TERMINATION 
LAMBDA 
TRYLAMBDA 
TRYCONFIG 
DAMPED 
TRYDELTA 

Definition at line 39 of file LevenbergMarquardtParams.h.

Constructor & Destructor Documentation

gtsam::LevenbergMarquardtParams::LevenbergMarquardtParams ( )
inline

Definition at line 61 of file LevenbergMarquardtParams.h.

gtsam::LevenbergMarquardtParams::~LevenbergMarquardtParams ( )
inlineoverride

Definition at line 125 of file LevenbergMarquardtParams.h.

Member Function Documentation

static LevenbergMarquardtParams gtsam::LevenbergMarquardtParams::CeresDefaults ( )
inlinestatic

Definition at line 106 of file LevenbergMarquardtParams.h.

boost::shared_ptr<NonlinearOptimizerParams> gtsam::LevenbergMarquardtParams::clone ( ) const
inline
Returns
a deep copy of this object

Definition at line 152 of file LevenbergMarquardtParams.h.

static LevenbergMarquardtParams gtsam::LevenbergMarquardtParams::EnsureHasOrdering ( LevenbergMarquardtParams  params,
const NonlinearFactorGraph graph 
)
inlinestatic

Definition at line 112 of file LevenbergMarquardtParams.h.

bool gtsam::LevenbergMarquardtParams::getDiagonalDamping ( ) const
inline

Definition at line 130 of file LevenbergMarquardtParams.h.

double gtsam::LevenbergMarquardtParams::getlambdaFactor ( ) const
inline

Definition at line 131 of file LevenbergMarquardtParams.h.

double gtsam::LevenbergMarquardtParams::getlambdaInitial ( ) const
inline

Definition at line 132 of file LevenbergMarquardtParams.h.

double gtsam::LevenbergMarquardtParams::getlambdaLowerBound ( ) const
inline

Definition at line 133 of file LevenbergMarquardtParams.h.

double gtsam::LevenbergMarquardtParams::getlambdaUpperBound ( ) const
inline

Definition at line 134 of file LevenbergMarquardtParams.h.

std::string gtsam::LevenbergMarquardtParams::getLogFile ( ) const
inline

Definition at line 136 of file LevenbergMarquardtParams.h.

bool gtsam::LevenbergMarquardtParams::getUseFixedLambdaFactor ( )
inline

Definition at line 135 of file LevenbergMarquardtParams.h.

std::string gtsam::LevenbergMarquardtParams::getVerbosityLM ( ) const
inline

Definition at line 137 of file LevenbergMarquardtParams.h.

static LevenbergMarquardtParams gtsam::LevenbergMarquardtParams::LegacyDefaults ( )
inlinestatic

Definition at line 100 of file LevenbergMarquardtParams.h.

void gtsam::LevenbergMarquardtParams::print ( const std::string &  str = "") const
overridevirtual

Reimplemented from gtsam::NonlinearOptimizerParams.

Definition at line 94 of file LevenbergMarquardtParams.cpp.

static LevenbergMarquardtParams gtsam::LevenbergMarquardtParams::ReplaceOrdering ( LevenbergMarquardtParams  params,
const Ordering ordering 
)
inlinestatic

Definition at line 119 of file LevenbergMarquardtParams.h.

static void gtsam::LevenbergMarquardtParams::SetCeresDefaults ( LevenbergMarquardtParams p)
inlinestatic

Definition at line 85 of file LevenbergMarquardtParams.h.

void gtsam::LevenbergMarquardtParams::setDiagonalDamping ( bool  flag)
inline

Definition at line 139 of file LevenbergMarquardtParams.h.

void gtsam::LevenbergMarquardtParams::setlambdaFactor ( double  value)
inline

Definition at line 140 of file LevenbergMarquardtParams.h.

void gtsam::LevenbergMarquardtParams::setlambdaInitial ( double  value)
inline

Definition at line 141 of file LevenbergMarquardtParams.h.

void gtsam::LevenbergMarquardtParams::setlambdaLowerBound ( double  value)
inline

Definition at line 142 of file LevenbergMarquardtParams.h.

void gtsam::LevenbergMarquardtParams::setlambdaUpperBound ( double  value)
inline

Definition at line 143 of file LevenbergMarquardtParams.h.

static void gtsam::LevenbergMarquardtParams::SetLegacyDefaults ( LevenbergMarquardtParams p)
inlinestatic

Definition at line 69 of file LevenbergMarquardtParams.h.

void gtsam::LevenbergMarquardtParams::setLogFile ( const std::string &  s)
inline

Definition at line 145 of file LevenbergMarquardtParams.h.

void gtsam::LevenbergMarquardtParams::setUseFixedLambdaFactor ( bool  flag)
inline

Definition at line 144 of file LevenbergMarquardtParams.h.

void gtsam::LevenbergMarquardtParams::setVerbosityLM ( const std::string &  s)
inline

Definition at line 146 of file LevenbergMarquardtParams.h.

LevenbergMarquardtParams::VerbosityLM gtsam::LevenbergMarquardtParams::verbosityLMTranslator ( const std::string &  s)
static

Definition at line 32 of file LevenbergMarquardtParams.cpp.

std::string gtsam::LevenbergMarquardtParams::verbosityLMTranslator ( VerbosityLM  value)
static

Definition at line 58 of file LevenbergMarquardtParams.cpp.

Member Data Documentation

bool gtsam::LevenbergMarquardtParams::diagonalDamping

if true, use diagonal of Hessian

Definition at line 56 of file LevenbergMarquardtParams.h.

double gtsam::LevenbergMarquardtParams::lambdaFactor

The amount by which to multiply or divide lambda when adjusting lambda (default: 10.0)

Definition at line 50 of file LevenbergMarquardtParams.h.

double gtsam::LevenbergMarquardtParams::lambdaInitial

The initial Levenberg-Marquardt damping term (default: 1e-5)

Definition at line 49 of file LevenbergMarquardtParams.h.

double gtsam::LevenbergMarquardtParams::lambdaLowerBound

The minimum lambda used in LM (default: 0)

Definition at line 52 of file LevenbergMarquardtParams.h.

double gtsam::LevenbergMarquardtParams::lambdaUpperBound

The maximum lambda to try before assuming the optimization has failed (default: 1e5)

Definition at line 51 of file LevenbergMarquardtParams.h.

std::string gtsam::LevenbergMarquardtParams::logFile

an optional CSV log file, with [iteration, time, error, lambda]

Definition at line 55 of file LevenbergMarquardtParams.h.

double gtsam::LevenbergMarquardtParams::maxDiagonal

when using diagonal damping saturates the maximum diagonal entries (default: 1e32)

Definition at line 59 of file LevenbergMarquardtParams.h.

double gtsam::LevenbergMarquardtParams::minDiagonal

when using diagonal damping saturates the minimum diagonal entries (default: 1e-6)

Definition at line 58 of file LevenbergMarquardtParams.h.

double gtsam::LevenbergMarquardtParams::minModelFidelity

Lower bound for the modelFidelity to accept the result of an LM iteration.

Definition at line 54 of file LevenbergMarquardtParams.h.

bool gtsam::LevenbergMarquardtParams::useFixedLambdaFactor

if true applies constant increase (or decrease) to lambda according to lambdaFactor

Definition at line 57 of file LevenbergMarquardtParams.h.

VerbosityLM gtsam::LevenbergMarquardtParams::verbosityLM

The verbosity level for Levenberg-Marquardt (default: SILENT), see also NonlinearOptimizerParams::verbosity.

Definition at line 53 of file LevenbergMarquardtParams.h.


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


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:58:18