#include <LevenbergMarquardtParams.h>
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 | |
std::shared_ptr< NonlinearOptimizerParams > | clone () 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 std::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 &ord) |
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... | |
std::optional< Ordering > | ordering |
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... | |
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.
Definition at line 45 of file LevenbergMarquardtParams.h.
See LevenbergMarquardtParams::verbosityLM
Enumerator | |
---|---|
SILENT | |
SUMMARY | |
TERMINATION | |
LAMBDA | |
TRYLAMBDA | |
TRYCONFIG | |
DAMPED | |
TRYDELTA |
Definition at line 39 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 61 of file LevenbergMarquardtParams.h.
|
inlineoverride |
Definition at line 125 of file LevenbergMarquardtParams.h.
|
inlinestatic |
Definition at line 106 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 152 of file LevenbergMarquardtParams.h.
|
inlinestatic |
Definition at line 112 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 130 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 131 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 132 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 133 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 134 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 136 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 135 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 137 of file LevenbergMarquardtParams.h.
|
inlinestatic |
Definition at line 100 of file LevenbergMarquardtParams.h.
|
overridevirtual |
Reimplemented from gtsam::NonlinearOptimizerParams.
Definition at line 93 of file LevenbergMarquardtParams.cpp.
|
inlinestatic |
Definition at line 119 of file LevenbergMarquardtParams.h.
|
inlinestatic |
Definition at line 85 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 139 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 140 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 141 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 142 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 143 of file LevenbergMarquardtParams.h.
|
inlinestatic |
Definition at line 69 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 145 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 144 of file LevenbergMarquardtParams.h.
|
inline |
Definition at line 146 of file LevenbergMarquardtParams.h.
|
static |
Definition at line 30 of file LevenbergMarquardtParams.cpp.
|
static |
Definition at line 57 of file LevenbergMarquardtParams.cpp.
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.