28 class LevenbergMarquardtOptimizer;
40 SILENT = 0, SUMMARY, TERMINATION, LAMBDA,
TRYLAMBDA, TRYCONFIG, DAMPED, TRYDELTA
43 static VerbosityLM verbosityLMTranslator(
const std::string &
s);
62 : verbosityLM(SILENT),
63 diagonalDamping(false),
66 SetLegacyDefaults(
this);
102 SetLegacyDefaults(&p);
108 SetCeresDefaults(&p);
126 void print(
const std::string&
str =
"")
const override;
152 boost::shared_ptr<NonlinearOptimizerParams>
clone()
const {
void print(const Matrix &A, const string &s, ostream &stream)
bool getUseFixedLambdaFactor()
~LevenbergMarquardtParams() override
static Ordering Create(OrderingType orderingType, const FACTOR_GRAPH &graph)
Factor Graph consisting of non-linear factors.
static enum @843 ordering
double lambdaFactor
The amount by which to multiply or divide lambda when adjusting lambda (default: 10.0)
double getlambdaInitial() const
double getlambdaFactor() const
LevenbergMarquardtParams()
double maxDiagonal
when using diagonal damping saturates the maximum diagonal entries (default: 1e32) ...
double minModelFidelity
Lower bound for the modelFidelity to accept the result of an LM iteration.
static LevenbergMarquardtParams CeresDefaults()
NonlinearFactorGraph graph
double absoluteErrorTol
The maximum absolute error decrease to stop iterating (default 1e-5)
bool getDiagonalDamping() const
double relativeErrorTol
The maximum relative error decrease to stop iterating (default 1e-5)
void setlambdaInitial(double value)
void setlambdaFactor(double value)
std::string logFile
an optional CSV log file, with [iteration, time, error, lambda]
std::string getLogFile() const
void setUseFixedLambdaFactor(bool flag)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
void setLogFile(const std::string &s)
bool useFixedLambdaFactor
if true applies constant increase (or decrease) to lambda according to lambdaFactor ...
void setDiagonalDamping(bool flag)
boost::optional< Ordering > ordering
The optional variable elimination ordering, or empty to use COLAMD (default: empty) ...
static SmartStereoProjectionParams params
double getlambdaUpperBound() const
void setlambdaUpperBound(double value)
void setlambdaLowerBound(double value)
static void SetCeresDefaults(LevenbergMarquardtParams *p)
double lambdaLowerBound
The minimum lambda used in LM (default: 0)
bool diagonalDamping
if true, use diagonal of Hessian
double minDiagonal
when using diagonal damping saturates the minimum diagonal entries (default: 1e-6) ...
void setVerbosityLM(const std::string &s)
static LevenbergMarquardtParams LegacyDefaults()
std::string getVerbosityLM() const
static LevenbergMarquardtParams EnsureHasOrdering(LevenbergMarquardtParams params, const NonlinearFactorGraph &graph)
double lambdaUpperBound
The maximum lambda to try before assuming the optimization has failed (default: 1e5) ...
double getlambdaLowerBound() const
Parameters for nonlinear optimization.
Ordering::OrderingType orderingType
The method of ordering use during variable elimination (default COLAMD)
VerbosityLM verbosityLM
The verbosity level for Levenberg-Marquardt (default: SILENT), see also NonlinearOptimizerParams::ver...
boost::shared_ptr< NonlinearOptimizerParams > clone() const
static LevenbergMarquardtParams ReplaceOrdering(LevenbergMarquardtParams params, const Ordering &ordering)
static void SetLegacyDefaults(LevenbergMarquardtParams *p)
size_t maxIterations
The maximum iterations to stop iterating (default 100)
double lambdaInitial
The initial Levenberg-Marquardt damping term (default: 1e-5)