Levenberg Marquardt taking a long time to converge

7 ビュー (過去 30 日間)
Nimit
Nimit 2012 年 1 月 18 日
Hello
I am using the LMA algorithm in lsqcurvefit to test for sensitivity of parameter estimation from a nonlinear model. Specifically, I generate (using randn) noisy datasets in a for loop and then extract parameters using lsqcurvefit.
A common problem I experience is that lsqcurvefit gets "stuck"/ takes a long time to converge with some "badly generated" data sets. I was wondering how I could control lsqcurvefit to skip fitting to such data sets. Is there a way to impose a time constraint to not let the algorithm take more than a certain amount of time? Or is there a way to limit the norm of step size with LMA? I don't want to use bound constraints and I also want to use LMA...
Finally I have both matlab 2009 and 2011 so if the implementation of LMA is more favorable in one version, please let me know...
Nimit

回答 (2 件)

Caroline Voloshin
Caroline Voloshin 2013 年 5 月 20 日
編集済み: Caroline Voloshin 2013 年 5 月 20 日
This won't answer your question, but if you introduce time constraints, how will you know that this constraint will only eliminate those "bad data sets" that you want to eliminate.
Or even otherwise, a time constraint on fitting will only decrease the effectiveness of the process. Do you want a good fit, or a fast-even-if-bad fit ?

Alan Weiss
Alan Weiss 2013 年 5 月 20 日
You can use an output function to stop lsqcurvefit if it is taking too long. You could just set the MaxIter option to do this, too, but you might want to use an output function to stop the solver based on time.
I am not 100% sure offhand how to look at time from within an output function. Perhaps call lsqcurvefit within a nested function, call tic before calling lsqcurvefit, and call toc within the output function.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

カテゴリ

Help Center および File ExchangeProblem-Based Optimization Setup についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by