Registered Member
|
Hi,
I've looked the code of your LevenbergMarquardt algorithm, and found quite different of the classical LM algorithm described in "Methods for non linear least square problems" by Madsen (the algorithm is page 27). Especially, it takes much less iteration to converge than other LM algorithm and i don't know why. Is there a paper describing your version of the LM algo ? (I'am not a math guru so maybe i'm wrong) Thanks. |
Moderator
|
It is a port of MINPACK, so you will find more details on the underlying algorithm there:
http://devernay.free.fr/hacks/cminpack/index.html http://en.wikipedia.org/wiki/MINPACK |
Registered Member
|
This is my code for 2 equations:
Q1: how can I return the value of iterations done by solver? Q2: How can I pass some constants (for instance: a,b,c in the equations)? |
Moderator
|
Q1: cout << lm.iter;
Q2: That's typically the role of MyFunctor to store the constants. |
Registered Member
|
is there possible to use LM in 3D (plane fitting)?
For example: F(x,y,a1,a2) = a1*exp(x)*a2*exp(y) |
Registered Member
|
Thank you for such fast response!
Could you please be more detailed? I need to solve tons of the sets of quadratic equations and they differ only by some constants: for instance, equations for 1st set will be:
for the 2nd set:
etc... How can pass this variable into struct? Sorry for nooby questions. |
Moderator
|
This is not related to Eigen. That's basic C/C++ practice. For instance you could add an attribute to your class with the associated getter/setter.
and operatro() and df() will use m_value instead of the hard-coded one. |
Registered Member
|
This question on stackoverflow is about Functors, you should read it http://stackoverflow.com/questions/3569 ... their-uses Bye! |
Registered Member
|
Thank you very much!
I've implemented everything that I was going to do. Results little bit different than compare to Matlab. Matlab gives better results and I dont know why. By the way, what means output "7" by the info, for instance the following code:
prints 7 on the screen. What does this mean? Where I can find the information about output infos? |
Registered Member
|
Oh I found in the topic the answer in the related topic here:
|
Registered Member
|
Unfortunately I can't find a more detailed description of these exit statuses.
Take a look at the "documentation": http://eigen.tuxfamily.org/dox/unsuppor ... uardt.html You can probably improve your results by tweaking the parameters :
Bye |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]