Registered Member
|
I am using Eigen-unsupported: LevenbergMarquardt algorithm.
I use this algorithm inside my model. I wrote the minimization code both in MATLAB (using fsolve) and C++ and both gave the similar results until recent changes in the model (not related to the optimization task). and now after some point code in C++ returns 0 for roots meanwhile matlab continue give relevant results. I make the simulation in the model for 1500 time steps, till 500 steps both (matlab and C++) give similar results, but after that point C++ LM algo returns zeroes for some roots and after that more and more zeroes. This is my code in c++:
Could you please give some advices how to return similar results (not zeroes roots): maybe to play with some parameters? Also, could you help me to implement NummericalDiff for this code? I've tried but didnt have the success. Regards, Igor |
Registered Member
|
Does anyone could help me? Thank you
|
Registered Member
|
Hey Igor,
don't know if this helps, but as this is in the unsupported section of Eigen, I would rely on some other library for LM: I use Ceres Solver (which uses Eigen for matrices). With Ceres you also have automatic differentiation, which is much better than numerical differentiation, I suggest you read up on the differences between the two: http://ceres-solver.org/tutorial.html#derivatives. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]