Should we always search for the global minima in our optimization problem?

9 views (last 30 days)
I am trying to fit a custom equation to a series of data. When I change the startpoints the obtained fitting parameters and the fitted curve to data changes. I am wondering should we always search for the global minima in our fitting (optimization) problem by using e.g. multistart or global search?
Thank you in advance!

Accepted Answer

John D'Errico
John D'Errico on 9 Jun 2022
Edited: John D'Errico on 9 Jun 2022
Yes. And, no. Amazing how the anwer is often, well, it depends...
You do want to find the true global min. Yes, that makes sense, as sort of a truism. But many problems are trivially solved without making the larger amount of effort to find a global min. Doing a global search takes more time. So do you ALWAYS want to waste time that need not be wasted? Of course not.
As well, in some cases, global solvers are not as good at zeroing into an accurate solution, whereas other tools will be rapidly convergent to the solution when they get near to it. So you may get a few less decimal places in the model parameters. And sometimes, those extra decimal places are really important.
It is often the case that merely having good starting values is sufficient to find the correct solution, without need for recourse to a global solver.
Looking at the converse, yes, a global solver can help. Sometimes. It makes things simpler for the novice. If you have no clue where to start a solver, a global solver typically just does not care.
A metaphor I often use for these questions is to think of the utilities in MATLAB, the various toolboxes and the tools in them, as if they were tools in your workshop. For example, in my shop, I have many screwdrivers, wrenches, hammers, saws. I know how to use all of them well, when to use one of the other. But supppose that tomorrow, XYZ comany introduces a magical tool that does everything for you. (They like to do that around the holidays.) So a tool that can turn any bolt, screw, cut any piece of wood for you, drive any nail. Not only that, but it is battery powered, with a lifetime battery!
What are the odds that the XYZ magic tool does its job only barely acceptably? Some of the time, it works nicely enough, but some of the times, it leaves a massive mess on your hands, destroying the part you are working on?
The point is, if you understand the tools in your workshop, if you understand the problem you are working on, then you will know which tool to use. You will not need to resort to the XYZ magic tool.
So understand the tools. Spend the time to learn how each optimizer works, what it does well, what it does poorly. What each one can do, and when to use it. Do the same time on the problem you want to solve. If you can, plot it. Look at how it works. What do the parameters mean? What are good starting values. PLOT YOUR DATA. Do your thinking in advance.
Of course, you don't need to do any of those things. But I will say that the person who wanders into my workshop and just starts grabbing random tools will probably soon find they are missing a hand, or at least some fingers. The same thing applies to the utter novice in MATLAB. That person may well find a global optimizer a good first choice, as it removes some of the need to understand the tools you are using. But I've seen as many novice MATLAB programmers having problems using the global optimizers as any other tool.
There is simply nothing better than understanding the tools you will use.
  1 Comment
Shaily_T
Shaily_T on 12 Jun 2022
Edited: Shaily_T on 12 Jun 2022
Thanks for your nice explanation! Yeah, actually for me even when I use global solvers (multistart or global search) the answer is the same as local solvers which seems strange to me.
Could you please let me know if you are aware of any good source to go through the tools and undrestand them better?

Sign in to comment.

More Answers (3)

Matt J
Matt J on 6 Jun 2022
Edited: Matt J on 6 Jun 2022
I am wondering should we always search for the global minima in our fitting (optimization) problem by using e.g. multistart or global search?
If when you say "we", you mean "everybody", then no. There are plenty of people who work with models for which it is not challenging to find the globally best fit without GlobalSearch. For example, polynomial and spline fitting problems do not have non-global minima, so it isn't something you have to worry about in scenarios like that.
However, your particular model may be unusually difficult and therefor may warrant a global optimizer if you are finding it challenging to identify a good initial start point. To be sure that your difficulties are not self-inflicted, however, it might be advisable to present a mathematical description (i.e., equations, not code) of the curve fitting problem you are facing. The community may then be able to recommend initialization strategies.
  1 Comment
Shaily_T
Shaily_T on 7 Jun 2022
Edited: Shaily_T on 7 Jun 2022
Thanks for your response! I have already tried using multistart and globalsearch in my code but the obtained fitting parameters are the same as not using multistart and global search. Also the result of multistart and global search only changes with my startpoints. I have attached the picture of the equation I am trying to fit data to. I am trying to fit "h" in my equation to data. My x is "freq" and my y is "h" . r1 , r2 , c , Start are constants and a, sigma, dis, d0 are fitting parameters. d is indeed a series of 9 Gaussian functions. "Rn" is related to "d" through "kramers-Kronig" relations. So its value at each point is dependent on the value of d at all points. https://en.wikipedia.org/wiki/Kramers%E2%80%93Kronig_relations
Thank you in advance!

Sign in to comment.


Walter Roberson
Walter Roberson on 6 Jun 2022
No!! Finding the "true vacuum" (global minima) energy state of the universe could be an utter disaster of the highest possible order!!! https://cosmosmagazine.com/science/physics/vacuum-decay-the-ultimate-catastrophe/?amp=1

Sam Chak
Sam Chak on 6 Jun 2022
For academic reasons, maybe a 'Yes' if your team want to demonstrate the novelty in the optimization problem that no one has done this before.
In most commercial industrial practices, then it's a 'No' because your team must to find the optimal solution in the operating region of interest only, so that the company can make cost-effective products at a profit in the desired specified time frame.
  16 Comments
Walter Roberson
Walter Roberson on 9 Jun 2022
It might perhaps make sense in some situations to have a sum of Gaussian that each have the same a and c, but different b (b being the center position.)
If that is your situation, then would the center positions b happen to be at regular intervals? Known interval?
Shaily_T
Shaily_T on 10 Jun 2022
Edited: Shaily_T on 10 Jun 2022
Yes, sorry I meant only a and c are assumed to be the same but b is different. The center positions b are happen to be at regular intervals. And the distance between them is a fitting parameter (also assumed to be the same between all Gaussians).

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!