Borrar filtros
Borrar filtros

Levenberg Marquardt taking a long time to converge

7 visualizaciones (últimos 30 días)
Nimit
Nimit el 18 de En. de 2012
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

Respuestas (2)

Caroline Voloshin
Caroline Voloshin el 20 de Mayo de 2013
Editada: Caroline Voloshin el 20 de Mayo de 2013
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 el 20 de Mayo de 2013
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

Categorías

Más información sobre Problem-Based Optimization Setup en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by