Reputation: 61
I'm successfully using Eigen's Levenberg-Marquart class following an example from: http://techblog.rga.com/determining-indoor-position-using-ibeacon/
I'm trying to figure out how to translate the damping parameter, lambda, into the parameters available in Eigen:
https://en.wikipedia.org/wiki/Levenberg-Marquardt_algorithm#Choice_of_damping_parameter
It's not clear to me what the "step bound for the diagonal shift" does via setFactor() - is this related to the damping parameter?
distance_functor functor(matrix, count);
Eigen::NumericalDiff<distance_functor> numDiff(functor);
Eigen::LevenbergMarquardt<Eigen::NumericalDiff<distance_functor>,double> lm(numDiff);
lm.parameters.factor = 100; //step bound for the diagonal shift, is this related to damping parameter, lambda?
lm.parameters.maxfev = 2000;//max number of function evaluations
lm.parameters.xtol = 1.49012e-08; //tolerance for the norm of the solution vector
lm.parameters.ftol = 1.49012e-08; //tolerance for the norm of the vector function
lm.parameters.gtol = 0; // tolerance for the norm of the gradient of the error vector
lm.parameters.epsfcn = 0; //error precision
Eigen::LevenbergMarquardtSpace::Status ret = lm.minimize(x);
Upvotes: 1
Views: 1999
Reputation: 11
Eigen::LevenbergMarquardt does not use Tikhonov regularization ("damping parameter") to find next Gauss-Newton direction. It subsequently calls a MINPACK' subroutine lmpar2(qrfac, m_diag, m_qtf, m_delta, m_par, m_wa1) that looks (if ill-posed) for a Gauss-Newton direction m_wa1 under constrain
|| m_diag * m_wa1 || <= m_delta,
i.e. instances of the diagonal matrix m_diag and positive parameter m_delta do vary at each call of lmpar2.
https://github.com/lunixbochs/eigen/blob/master/unsupported/Eigen/src/LevenbergMarquardt/LMonestep.h
http://docs.ros.org/en/indigo/api/acado/html/lmpar_8h_source.html
Upvotes: 1
Reputation: 29245
This is a port from minpack, so you can also look at its documentation:
factor is a positive input variable used in determining the initial step bound. this bound is set to the product of factor and the euclidean norm of diag*x if nonzero, or else to factor itself. in most cases factor should lie in the interval (.1,100.).100. is a generally recommended value.
Upvotes: 1