How do I improve convergence in Fitting my data with Curve Fitting Toolbox?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 9 de Abr. de 2012
Comentada: Alex Sha
el 20 de Jun. de 2019
I am looking for suggestions to improve fitting performance using Curve Fitting Toolbox.
Respuesta aceptada
MathWorks Support Team
el 25 de Abr. de 2019
Editada: MathWorks Support Team
el 24 de Abr. de 2019
There are a plethora of issues that influence curve fitting.
1. The most notable is selection of model, either from our curve-fitting library or the user's custom equations. We suggest trying different models to fit the data.
2. Some preprocessing of data prior to fitting curve is helpful. This may include:
- Transforming the response data.
- Removing Infs, NaNs, and outliers.
3. The fitting process is more likely to converge if you supply as much information as possible about the coefficients being estimated:
- Make intelligent guesses as starting values. If you have an idea about the likely coefficient values, then use those as starting values.
- In absence of knowledge of starting values, try a variety of different starting values.
- Try restraining the parameters. For example if you know a parameter has to be positive, placing its lower bound at 0 may lead the iterative process toward a solution that it might not find otherwise.
4. There are various fitting options that you can adjust:
- Try different algorithms.
- Increase the number of iterations or function evaluations allowed.
- Reduce the convergence tolerance.
5. Try also sub-setting the data and fitting different subsets of data separately.
6. Another strategy is to fit a term at a time. So say you think your model is
y = c+ a*exp(b*x) + d*sin(f*x);
Then you might want to fit
y = c + a*exp(b*x)
and then use the resulting coefficients for a, b, and c as starting points when fitting the whole equation
y = c+ a*exp(b*x) + d*sin(f*x);
1 comentario
Alex Sha
el 20 de Jun. de 2019
Excellent explanation, great helpful!Just add one point: optimization algorithms adopted or used are one key factor affecting the goodness for curve fitting. The packages like Baron, Lingo or 1stOpt, Compared with the curve fitting toolbox in Matlab, are much easy for using in data fit, since those softawre have adopted global optimization algorithms, as a result, the guess of initial start-values is no longer required, but with much better results. Just want to know why the fitting toolbox in Matlab does not use global optimization algorithms?
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with Curve Fitting Toolbox en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!