curve fitting or optimisation toolbox
16 views (last 30 days)
Show older comments
I'm thinking about buying the curve fitting or optimisation toolbox.
Is there much of an overlap? Can the Optimisation tool box cover everything that the curve fitting toolbox does?
1 Comment
Star Strider
on 10 Nov 2020
I would also consider the Statistics and Machine Learning Toolbox, and the Global Optimization Toolbox.
Accepted Answer
Matt J
on 10 Nov 2020
Edited: Matt J
on 10 Nov 2020
In terms of actual fitting, yes, the Optimization Toolbox can fit all the same functions, and more. However, the Curve Fitting Toolbox also contains code routines for post-analysis of the fit (like goodness of fit measures and confidence intervals on the parameters) that are not available in the Optimization Toolbox, so you would have to code that yourself. In my experience, that is the sacrifice that most people trying to replace the Curve Fitting Toolbox with the Optimization Toolbox find inconvenient.
0 Comments
More Answers (1)
John D'Errico
on 10 Nov 2020
Edited: John D'Errico
on 10 Nov 2020
A lot depends on what you would be doing. For myself, both toolboxes are hugely valuable. I'd get them both. :)
But really, if you will not be doing more than curve fitting in 1 or 2 dimensions, then the curve fitting toolbox is incredibly valuable. It makes model specification pretty easy for a huge set of models, and allows you to easily build custom models. The CFTB also provides confidence intervals on the parameters. You need to do that work yourself with the optimization TB.
So if you have the CFTB, then if you occasionally need to do general optimization, you can always use tools like fminseach, fzero, fminbnd. lsqnonneg is also part of MATLAB, not the optimization toolbox, so you get that too. You can download my fminsearchbnd, to handle at least simple general optimization problems.
But you will be missing the ability to solve larger scale optimization problems. Linear programming, integer linear programming. You will be missing lsqlin, which can handle linear least squares subject to linear equality and inequality contraints, as well as bound constrained problems. You can download my LSE, from the FIle Exchange, which does give you linear least squares with equality constraints.
Conversely, if you get the optimization toolbox but not the CFTB, you get all of those tools, but not as good capability to handle the common curve fitting problems. You do have lsqnonlin and lsqcurvefit, which can fit any model you want, but not as slick an interface. The CFTB also provides spline tools (essentially that which used to be part of the splines toolbox) so if you don't have the CFTB, then you lose some spline modeling capability. You can always download my SLM toolbox, which does provide some nice 1-d spline modeling tools.
So I see it as really a question of what problems you need to solve more often. What do you NEED, and what do you only WANT? What one toolbox is missing, you can often cobble together from other sources. But which class of problems do you find yourself needing to solve most often? Which set of problems do you foresee in your future? Yes, the Clairvoyance Toolbox is also nice, but it is only on beta test so far, and it refuses to tell me which stocks to buy. All I get is "buy low, sell high." :)
As I said, better to get both toolboxes. And then, there is the Global Optimization toolbox, which fills in some additional holes. Just remember - he who dies with the most tools, wins! :)
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!