MathGroup Archive 2008

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

Search the Archive

RE: Plot vs NMaximize

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94282] RE: [mg94221] Plot vs NMaximize
  • From: "David Park" <djmpark at comcast.net>
  • Date: Tue, 9 Dec 2008 07:03:03 -0500 (EST)
  • References: <13842004.1228737086065.JavaMail.root@m02>

Nikolaus,

How about a specific example where NMaximize gets stuck but you can easily
see the maximum from a plot?

In the case a 2D function I can envision a dynamic display that would have a
background contour plot of the function and a movable rectangle with
adjustable side lengths that would pick a certain region, and then NMaximize
would be used within the region to give a higher precision answer. So why
not combine the two in that way?

It might be possible to make, say, a ParametricPlot3D, extract the points,
and pick off a 'maximum' point and then use that with NMaximize or
FindMaximum.

But if the function is of a type that NMaximize gets stuck on because there
are a number of local maximums, then it seems that a simultaneous visual and
numerical display would be worthwhile, rather than just getting an answer
'blind'.

And, of course, NMaximize is much more general than what one can plot, and
plots can miss detail points.


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  




From: Nikolaus Rath [mailto:Nikolaus at rath.org] 

Hello,

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?


Best,

   -Nikolaus



  • Prev by Date: Re: Plot vs NMaximize
  • Next by Date: Re: A 3D Plot Query
  • Previous by thread: Re: Plot vs NMaximize
  • Next by thread: Re: Plot vs NMaximize