Registered Member
|
I have a question about the expected format of the Functor passed to the Eigen LevenbergMarquardt class. For a robotic Hand-Eye sensor calibration routine, I have a function that takes in two poses (12 numbers) and outputs a single cost value. When I run the code, the minimization method returns LevenbergMarquardtSpace::ImproperInputParameters because functor.values() < functor.inputs(). Most non-linear optimizations I run have a single cost value or a weighted combination of combined cost values. Can you please tell me why the output vector must be larger than the input vector or what I am miss understating about the desired functor format.
|
Moderator
|
LM does least square solving of functional like:
sum_i (f_i(x))^2 the functor should output the evaluation of each f_i into a vector. df() should compute the respective Jacobian. |
Registered Member
|
That's how Gael said.
the functor values() is not the number of outputs of the function to be matched, but the number of values, or 'tests' that you want to match. This is why it's not called 'outputs()'. This is 'm' on http://en.wikipedia.org/wiki/Levenberg_Marquardt the number of 'empirical datum pairs' |
Registered Member
|
Thanks for the advice; my code is now working. Instead of summing the pose errors, I return each error individually.
Returning to the original ImproperInputParameters method return. While desirable, is there a strict requirement for the LM solution to be overdetermined (functor.values() > functor.inputs())? A simple explanation of the expected Functor format would be very helpful. Without it, or half a day of deciphering the test code, the class is not usable. |
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]