c++ - 如何使用 Eigen 设置 Levenberg-Marquardt 阻尼

标签 c++ eigen levenberg-marquardt

我成功地使用了 Eigen 的 Levenberg-Marquart 类,示例来自:http://techblog.rga.com/determining-indoor-position-using-ibeacon/

我正在尝试弄清楚如何将阻尼参数 lambda 转换为 Eigen 中可用的参数:

https://en.wikipedia.org/wiki/Levenberg-Marquardt_algorithm#Choice_of_damping_parameter

http://eigen.tuxfamily.org/dox/unsupported/classEigen_1_1LevenbergMarquardt.html#a20efa2f5a684efaf2499ba5bdd51e792

我不清楚通过 setFactor() 执行的“对角线偏移步长”的作用 - 这与阻尼参数有关吗?

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);

最佳答案

这是来自 minpack 的端口,所以你也可以查看它的 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.

关于c++ - 如何使用 Eigen 设置 Levenberg-Marquardt 阻尼,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34701160/

相关文章:

c++ - 非常小方阵的特征线性求解器

python - Eigen + MKL 或 OpenBLAS 比 Numpy/Scipy + OpenBLAS 慢

c++ - 向 Qt QML Maps 添加标记/位置?

c++ - Eigen slerp 导致读取访问冲突 (C++/OpenGL)

c++ - 当 C++ const 方法同步可变状态时,非常量方法也必须这样做吗?

android - 使用 iBeacons 在 Android 中进行三边测量

math - 如何处理运动优化/束调整中结构中缺失的数据

r - R 中的非线性最小二乘法 - Levenberg Marquardt 以拟合 Heligman Pollard 模型参数

Windows 上的 C++ : function to get allocated memory?

c++ - 您选择的 CPU 不支持 x86-64 指令集