MathGroup Archive 2006

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

Search the Archive

Re: Points sampled by FindMinimum

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71145] Re: Points sampled by FindMinimum
  • From: Bill Rowe <readnewsciv at sbcglobal.net>
  • Date: Thu, 9 Nov 2006 03:38:16 -0500 (EST)

On 11/8/06 at 6:06 AM, andrew.j.moylan at gmail.com (Andrew Moylan)
wrote:

>Please consider the following code, which asks FindMinimum to
>minimise a simple parabolic function while tracking at which which
>points FindMinimum evaluates the function:

>func[x_?NumericQ] := (Print[x]; 1 + (x - 1)^2) FindMinimum[func[x],
>{x, 0.1}]

>The output is:

>0.1 0.1 0.1 0.6 0.6 0.6 1. 1. 1. 1. 1. 1.

>But I would have expected output more like:

>0.1 0.6 1. 1.

>Can anyone explain why FindMinimum evaluates func three times at
>each test point, instead of once?

I rather doubt FindMinimum is evaluating the function three 
times at each point. I am reasonably certain the difference 
between sampled points is simply fairly small and the Print 
statement doesn't show enough digits to make it apparent there 
is a difference.

That is

In[4]:=
.1000001

Out[4]=
0.1

In[5]:=
.1000002

Out[5]=
0.1
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: $PathnameSeparator and DirectoryName
  • Next by Date: Re: Option Inspector Window Font Size
  • Previous by thread: Re: Points sampled by FindMinimum
  • Next by thread: Re: Points sampled by FindMinimum