MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Plot vs NMaximize

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94414] Re: Plot vs NMaximize
  • From: Nikolaus Rath <Nikolaus at rath.org>
  • Date: Fri, 12 Dec 2008 06:55:41 -0500 (EST)
  • References: <ghqk1q$16j$1@smc.vnet.net>

Bill Rowe <readnews at sbcglobal.net> writes:
> On 12/10/08 at 4:47 AM, Nikolaus at rath.org (Nikolaus Rath) wrote:
>
>>Bill Rowe <readnews at sbcglobal.net> writes:
>
>>>An effective way to use NMaximize, is to first Plot the function
>>>and use that plot to specify the search range to be used with
>>>NMaximize (at least for the 1-D problem).
>
>>I fully agree. But my question is: why doesn't NMaximize do this
>>automatically? It seems like a very sensible thing to do.
>
> Quite simply with existing technology there is no practical way to
> do this. In essence, you are asking for an automated algorithm for
> finding a global maximum. That is a very tough problem.

No, you misunderstood me. I am asking for NMaximize to first sample
the function the same way plot does, and then take into account this
information when continuing with the currently used algorithms.

There was already code posted here that demonstrated this for simply
setting the starting position of NMaximize based on Plot[].

So why isn't such code inserted into NMaxmize directly? Of course even
with this additional step NMaximize may fail to find the global
maximum, but it will certainly work better in many cases and I don't
see any cases where it would be detrimental.

> You can somewhat approximate what plot does with NMaximize by
> choosing a different method for the maximization. The methods
> RandomSearch, DifferentialEvolution and SimulatedAnnealing all
> generate random samples in your coordinate space then process those
> sample points to find a maximum or minimum. You can get more details
> on these methods in the tutorial

But even with these methods, there are cases where Plot[] performs
better (I tried this for an interpolated function, so unfortunately I
cannot post it here).

> Also, note the process of using Plot to find a maximum isn't without
> issues as well.

Yes. Therefore I'm asking for NMaximize to *take into account* the
information from Plot[], not to use Plot[] as a substitute for
NMaximize.


Best,

   -Nikolaus

--
 =C2=BBIt is not worth an intelligent man's time to be in the majority.
  By definition, there are already enough people to do that.=C2=AB
                                                         -J.H. Hardy

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C


  • Prev by Date: RE: Re: A 3D Plot Query
  • Next by Date: Re: Mathematica 7 is now available
  • Previous by thread: Re: Plot vs NMaximize
  • Next by thread: Re: Re: Plot vs NMaximize