Excel Solver least squares vs MatLab optimization
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Dear community,
I tried to solve an non-linear problem with MatLab using fminsearch and nlinfit. Both work well and I get feasible fits. But then again, the Solver of Excel finds slightly different values with a smaller minimum. Data has been normalized in both cases. Can somebody help me with that? Another issue would be to show the calculated residues in the output.
Thank you very much.
1 comentario
Respuestas (1)
John D'Errico
el 7 de Feb. de 2023
fminsearch is never a tool you want to use if you want any kind of strong convergence. Sorry. But comparing anything to fminsearch will always see a poor result on the side of fminsearch. The only serious advantage fminsearch has is it is always there, and it is easy to use. Finally, if you used fminsearch, you are working with a sum of squares of residuals. This alone forces fminsearch into a position of disadvantage, since you now lose a grat deal of precision. Nonlinear regression solvers do not explicitly for a sum of squares of residuals.
As far as a different solver finding different results, this may be a question of starting values, convergence tolerances, etc. It may even be a question of the data not even being identically the same, as far too often we see that people have not moved the data over exactly between systems. If you have rounded your data when copying it into MATLAB, then your data is not the same.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!