MathGroup Archive 2008

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

Search the Archive

Re: Plot vs NMaximize

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94274] Re: Plot vs NMaximize
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Tue, 9 Dec 2008 07:01:32 -0500 (EST)

On 12/8/08 at 6:22 AM, Nikolaus at rath.org (Nikolaus Rath) wrote:

>It seems to me that it is significantly faster *and* more accurate
>to determine global maxima by plotting the function and looking for
>the positions on the plot than to use NMaximize: in all the cases
>that I've encountered recently, NMaximize got stuck in local extrema
>(which was very easy to see when looking at the plot).

>I know that global optimization is a very difficult problem, but I
>do not understand why Plot[] does not suffer from the same problem.
>If Plot[] is able to generate a plot where I can see the position of
>the global maximum in a second, why does NMaximize need several
>seconds to get stuck in some local maxima? Shouldn't it be able to
>make use of the same algorithms that Plot[] uses?

In short, no. The algorithms in Plot say nothing whatever about
either maxima or minima. All the plot algorithm does is sample
your function and display points at each sampled position
connecting them with lines. In absolutely no case, does this say
anything about a maximum or minimum. It is only your
interpretation of the resulting graphic that assigns
maximum/minimum to the plot. The points you see as
maximum/minimum are in no way different from any other plotted
point from the perspective of the algorithms used in Plot.

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).



  • Prev by Date: Re: A 3D Plot Query
  • Next by Date: Re: Combinatorica documentation: Backtrack[]
  • Previous by thread: Re: Plot vs NMaximize
  • Next by thread: RE: Plot vs NMaximize