Registered Member
|
I have been happily using Eigen in a project, and I am impressed! I now have need for a nonlinear solver, so I tried the HybridNonLinearSolver from the NonLinearOptimization library in Eigen unsupported. In my problem, I will need to numerically estimate the Jacobian. Unfortunately, the routine to compute the numerical Jacobian, fdjac1.h, asserts on line 25 in Eigen 3.0.3 when the input and values are not of the same length. This seems odd since it is normally permissible to have more values than inputs for a least-squares solver. I have attached toy code below that causes this assert.
Any hints on what I am doing wrong? The regression test does not seem to cover the case with numerically computed Jacobian and unequal input and value vector lengths.
|
Registered Member
|
HybridNonLinearSolver is not a least-squares solver. As its documentation on http://eigen.tuxfamily.org/dox/unsuppor ... olver.html says:
So you need as many functions as variables. |
Moderator
|
indeed, if you want to solve for non linear least-square you should rather use the Levenberg-Marquart solver of the same module.
|
Registered Member
|
Thanks for the very quick replies! I originally tried the Levenberg-Marquart solver and also had compilation issues. I think that I have traced this LM issue down to my JacobianType specification: the LM method assumes that both dimensions are Eigen::Dynamic, but my code had one dimension specified at compilation time. I will post my results in the next couple of days. Thanks again!
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]