Re: Points sampled by FindMinimum
- To: mathgroup at smc.vnet.net
- Subject: [mg71146] Re: [mg71085] Points sampled by FindMinimum
- From: "Chris Chiasson" <chris at chiasson.name>
- Date: Thu, 9 Nov 2006 03:38:20 -0500 (EST)
- References: <200611081114.GAA22323@smc.vnet.net>
It does appear to evaluate some points twice, but not six times. Perhaps this is due to their finite differencing scheme (because it can't compute a symbolic gradient for your function). I would be interested in developer input on this one. In[1]:= func[x_?NumericQ]:=(Print[FullForm[x]];1+(x-1)^2) FullForm@FindMinimum[func[x],{x,0.1}] From In[1]:= 0.1` From In[1]:= 0.1` From In[1]:= 0.10000000149011612` From In[1]:= 0.6` From In[1]:= 0.6` From In[1]:= 0.6000000089406967` From In[1]:= 0.9999999776482598` From In[1]:= 0.9999999776482598` From In[1]:= 0.9999999925494206` From In[1]:= 0.9999999925494208` From In[1]:= 0.9999999925494208` From In[1]:= 1.000000007450582` Out[2]//FullForm= List[1.`,List[Rule[x,0.9999999925494208`]]] On 11/8/06, Andrew Moylan <andrew.j.moylan at gmail.com> wrote: > Hi all, > > 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? > > Cheers, > Andrew > > -- http://chris.chiasson.name/
- References:
- Points sampled by FindMinimum
- From: "Andrew Moylan" <andrew.j.moylan@gmail.com>
- Points sampled by FindMinimum