How to know if a minimum found with Global Search is actually the Global minimum?
Mostrar comentarios más antiguos
I try to find a global minimum with fmincon() in a GlobalSearch. I gave it a maximum runtime of 30 minutes. The solver ended long before that with the following message:
gs = GlobalSearch('MaxTime',1800); %
[global_min,fg,exitflag,output,solutions] = run(gs,problem)
GlobalSearch stopped because it analyzed all the trial points.
3 out of 19 local solver runs converged with a positive local solver exit flag.
Elapsed time is 507.457135 seconds.
exitflag = 2
I know that these 3 found solutions are local minima, but is the "most optimal" of those minima, the one saved in 'global_min' actually the global minimum? How can I find out if it is? The documentation for GlobalSearch() does not seem to cover it.
13 comentarios
"How can I find out if it is?"
Write out all of the (possibly infinite) points of your data space (use grid paper**) and calculate the function by hand for every datum point. Then you will know if the solution found by a numeric optimzation algorithm is the actual minimum or not.
"The documentation for GlobalSearch() does not seem to cover it."
It would be quite surprising to many people in quite a few academic disciplines, if the MATLAB documentation gave the general solution to a problem that has no general solution:
You might be able to solve this problem using quantum computing, but I am not an expert on this topic.
** or whatever the higher-dimension equivalent is.
Bjorn Gustavsson
el 27 de En. de 2021
You have to think about optimization-problems as a generalization of finding the topographically lowest point in some region or the corresponding higher-dimensional expansions, as far as I understand this. The optimization-function does its best, to find this point, using some algorithm, typically there are some underlying assumptions about smoothness, or even smoothness of the gradients, using some of any number of clever algorithms. Regardless of which algorithm that is used it is impossible to exclude the possibility that there is a close to infinitely deep hole somewhere in this region, and this hole might be infinitesimally narrow too, without necessarily violating the smoothness of the function, imagine a 2 (or N) dimensional Gaussian that is very narrow and deep. No algorithm can guarantee that such a narrow minima is found.
I don't see how symbolic mathematics can provide a general solution, if the function itself is provided as a black-box.
Of course if the function or algorithm is known then this knowledge could potentially be used numerically or algebraically or in some other way to reduce the task complexity or perhaps even generate a general solution. Symbolic mathematics might be one tool that could be used here.
"...that the minimum saved in 'global_min' is the 'most optimal' minimum regardless of it being a global minimum or not?"
The run documentation
describes its first output as "Best point found, returned as a real array. The best point is the one with lowest objective function value."
John D'Errico
el 27 de En. de 2021
What do you mean by this: "Is at least my assumption correct, that the minimum saved in 'global_min' is the 'most optimal' minimum regardless of it being a global minimum or not?"
Sorry, but "most optimal" is a bit like being semi-pregnant. The min found is either the global min, or it is not. Most optimal makes no mathematical sense.
As I explain in my answer though, there is NO assurance that the min found will be the true global min. But again, that is IMPOSSIBLE to know on some fully general function.
John D'Errico
el 27 de En. de 2021
Bjorn & Stephen: Suppose I had the power to "move" your responses into answers? Would you not have liked that? Both of your comments were quite good and to the point, and were certinly good enough to be answers. But you used comments for a reason.
Stephen23
el 27 de En. de 2021
@John D'Errico: I sense a meta-discussion related to recent communications we have had with TMW...
Yes, I used comments for a reason.
But when I think about it now, these are mostly rather ephemeral, personal reasons which are not particularly important from an objective view of this thread: because I happen to believe something about information presentation, about communication, about curent and future readers, etc., i.e. due to my views and beliefs about people and this forum, which are quite possibly incorrect. I can certainly conceive that someone else might view the structure of information on this thread in a different way to me, based on some different knowledge and beliefs than mine. Thus from an objective perspective, moving my comment to an answer could make sense. Who am I to disagree?
Perhaps the strongest argument against moving a comment to an answer is simply one of politeness: i.e. acknowledging that the original author had their own reason for making a comment rather than an answer.
John D'Errico
el 27 de En. de 2021
How could you possibly have guessed? :) Thank you for your thoughts.
I do agree, that sometimes I will post a comment that is probably quasi-adequate as an answer, but put it in a comment for a variety of reasons. When I do, the odds are good that my comment is not as well thought out or as complete as it would be if I really wanted it to be an answer in the first place. In that case, if someone else were to arbitrarily move it into an answer, then I will probably be unhappy. It might force me to spend the extra time I did not wish to spend to upgrade my now answer.
Regardless, I think you are correct. Politeness suggests the best solution is to just ask the commentor to move their comment into an answer.
Bjorn Gustavsson
el 27 de En. de 2021
@e_frog: Not to worry, you only displayed the not unusual "out of class disappointment of meeting the reality of not nice example-problems" - I've stomped around the office and our lab crying about how unfair universe is that it has given me problems that aren't nicely solveable, I've even used bad language on occasion...
@John D'Errico, that would've been perfectly OK, I didn't know I would make a good enough contribution when I started typing, and when I finished I didn't bother shifting it.
Stephen23
el 27 de En. de 2021
@e_frog: your question is a good one and your response to the answers/comments has been exemplary.
For your information, the last few comments are related to a proposed change to this forum, which some regular users are contemplating how it would be used effectively and under what circumstances. So really quite a meta-discussion.
Sorry for hijacking your thread!
e_frog
el 28 de En. de 2021
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Parallel Computing Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!