Go to the documentation of this file.
28 class LevenbergMarquardtOptimizer;
40 SILENT = 0, SUMMARY, TERMINATION, LAMBDA,
TRYLAMBDA, TRYCONFIG, DAMPED, TRYDELTA
43 static VerbosityLM verbosityLMTranslator(
const std::string &
s);
44 static std::string verbosityLMTranslator(VerbosityLM
value);
62 : verbosityLM(SILENT),
63 diagonalDamping(false),
66 SetLegacyDefaults(
this);
71 p->maxIterations = 100;
72 p->relativeErrorTol = 1
e-5;
73 p->absoluteErrorTol = 1
e-5;
75 p->lambdaInitial = 1
e-5;
76 p->lambdaFactor = 10.0;
77 p->lambdaUpperBound = 1e5;
78 p->lambdaLowerBound = 0.0;
79 p->minModelFidelity = 1
e-3;
80 p->diagonalDamping =
false;
81 p->useFixedLambdaFactor =
true;
87 p->maxIterations = 50;
88 p->absoluteErrorTol = 0;
89 p->relativeErrorTol = 1
e-6;
91 p->lambdaUpperBound = 1e32;
92 p->lambdaLowerBound = 1
e-16;
93 p->lambdaInitial = 1
e-04;
94 p->lambdaFactor = 2.0;
95 p->minModelFidelity = 1
e-3;
96 p->diagonalDamping =
true;
97 p->useFixedLambdaFactor =
false;
102 SetLegacyDefaults(&
p);
108 SetCeresDefaults(&
p);
126 void print(
const std::string&
str =
"")
const override;
152 std::shared_ptr<NonlinearOptimizerParams>
clone()
const {
void setlambdaUpperBound(double value)
static LevenbergMarquardtParams ReplaceOrdering(LevenbergMarquardtParams params, const Ordering &ord)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
void setVerbosityLM(const std::string &s)
void setLogFile(const std::string &s)
static Ordering Create(OrderingType orderingType, const FACTOR_GRAPH &graph)
double minDiagonal
when using diagonal damping saturates the minimum diagonal entries (default: 1e-6)
LevenbergMarquardtParams()
void setlambdaInitial(double value)
static const SmartProjectionParams params
bool diagonalDamping
if true, use diagonal of Hessian
std::string logFile
an optional CSV log file, with [iteration, time, error, lambda]
std::string getLogFile() const
void print(const Matrix &A, const string &s, ostream &stream)
static LevenbergMarquardtParams EnsureHasOrdering(LevenbergMarquardtParams params, const NonlinearFactorGraph &graph)
static void SetCeresDefaults(LevenbergMarquardtParams *p)
double lambdaLowerBound
The minimum lambda used in LM (default: 0)
double getlambdaFactor() const
double lambdaUpperBound
The maximum lambda to try before assuming the optimization has failed (default: 1e5)
double lambdaInitial
The initial Levenberg-Marquardt damping term (default: 1e-5)
bool getUseFixedLambdaFactor()
bool getDiagonalDamping() const
std::string getVerbosityLM() const
double minModelFidelity
Lower bound for the modelFidelity to accept the result of an LM iteration.
void setlambdaFactor(double value)
static LevenbergMarquardtParams CeresDefaults()
Factor Graph consisting of non-linear factors.
void setlambdaLowerBound(double value)
double getlambdaInitial() const
static LevenbergMarquardtParams LegacyDefaults()
double getlambdaLowerBound() const
double lambdaFactor
The amount by which to multiply or divide lambda when adjusting lambda (default: 10....
std::shared_ptr< NonlinearOptimizerParams > clone() const
bool useFixedLambdaFactor
if true applies constant increase (or decrease) to lambda according to lambdaFactor
NonlinearFactorGraph graph
VerbosityLM verbosityLM
The verbosity level for Levenberg-Marquardt (default: SILENT), see also NonlinearOptimizerParams::ver...
Parameters for nonlinear optimization.
double getlambdaUpperBound() const
double maxDiagonal
when using diagonal damping saturates the maximum diagonal entries (default: 1e32)
void setDiagonalDamping(bool flag)
~LevenbergMarquardtParams() override
static void SetLegacyDefaults(LevenbergMarquardtParams *p)
void setUseFixedLambdaFactor(bool flag)
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:33:07