<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/174363</link>
    <title>MATLAB Central Newsreader - Line search failing?</title>
    <description>Feed for thread: Line search failing?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 14 Aug 2008 21:33:02 -0400</pubDate>
      <title>Line search failing?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/174363#449214</link>
      <author>David Doria</author>
      <description>I am using fminunc to try to find the minimum of a function.&lt;br&gt;
&amp;nbsp;I plotted the function (it is only 2d) and it seems&lt;br&gt;
extremely well behaved - visually it there is without a&lt;br&gt;
doubt a single local min if you start any where near the min&lt;br&gt;
value (the value is at (20, 0) and there looks to be about a&lt;br&gt;
5 unit radius of convergence).&lt;br&gt;
&lt;br&gt;
However, when I run fminunc, I get:&lt;br&gt;
&lt;br&gt;
Line search cannot find an acceptable point along the&lt;br&gt;
current search direction.&lt;br&gt;
&lt;br&gt;
The only thing I could think to check is if the gradient was&lt;br&gt;
somehow 0-ish even though it didn't look like it in the&lt;br&gt;
plot, but when I output the gradient at the iteration it&lt;br&gt;
gives the error it is&lt;br&gt;
&lt;br&gt;
Gradient is: &lt;br&gt;
&lt;br&gt;
ans =&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;-1.2747&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0.4237&lt;br&gt;
&lt;br&gt;
Does anyone know what else to check to see why line search&lt;br&gt;
can't find a good point?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
Dave</description>
    </item>
    <item>
      <pubDate>Thu, 14 Aug 2008 22:04:01 -0400</pubDate>
      <title>Re: Line search failing?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/174363#449220</link>
      <author>Matt </author>
      <description>&lt;br&gt;
&amp;gt; Does anyone know what else to check to see why line search&lt;br&gt;
&amp;gt; can't find a good point?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Dave&lt;br&gt;
&lt;br&gt;
Singularity of the Hessian possibly. If the method the &lt;br&gt;
routine is using is Newton-like, it may be trying to &lt;br&gt;
compute the Hessian, or some approximation to it, and to &lt;br&gt;
invert it.&lt;br&gt;
&lt;br&gt;
If the Hessian at the point is nearly singular, it will &lt;br&gt;
have problems, I'd imagine.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;nbsp;</description>
    </item>
    <item>
      <pubDate>Thu, 14 Aug 2008 22:12:02 -0400</pubDate>
      <title>Re: Line search failing?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/174363#449221</link>
      <author>Matt </author>
      <description>&quot;Matt &quot; &amp;lt;mjacobson.removethis@xorantech.com&amp;gt; wrote in &lt;br&gt;
message &amp;lt;g82a4h$hj9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Does anyone know what else to check to see why line &lt;br&gt;
search&lt;br&gt;
&amp;gt; &amp;gt; can't find a good point?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Thanks,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Dave&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Singularity of the Hessian possibly. If the method the &lt;br&gt;
&amp;gt; routine is using is Newton-like, it may be trying to &lt;br&gt;
&amp;gt; compute the Hessian, or some approximation to it, and to &lt;br&gt;
&amp;gt; invert it.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; If the Hessian at the point is nearly singular, it will &lt;br&gt;
&amp;gt; have problems, I'd imagine.&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Just to elaborate a bit, if the Hessian (or its &lt;br&gt;
approximation) is not positive definite, the routine may &lt;br&gt;
have computed a search direction which is not a descent &lt;br&gt;
direction. In this case, the line search may easily not &lt;br&gt;
find a point of descent.&lt;br&gt;
&lt;br&gt;
Do you have anyway of extracting the search direction &lt;br&gt;
vector? I'm afraid I'm not that familiar with fminunc, but &lt;br&gt;
if you can extract it, you can take its inner product with &lt;br&gt;
the (-gradient) to see if the directional derivative along &lt;br&gt;
the search direction is negative (as you would like it to &lt;br&gt;
be). </description>
    </item>
    <item>
      <pubDate>Fri, 15 Aug 2008 20:31:49 -0400</pubDate>
      <title>Re: Line search failing?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/174363#449394</link>
      <author>Marcelo Marazzi</author>
      <description>Dave,&lt;br&gt;
&lt;br&gt;
Possible reasons are that the line search algorithm failed&lt;br&gt;
because the objective function is not differentiable. Or&lt;br&gt;
because roundoff errors are stalling convergence of the line&lt;br&gt;
search algorithm.&lt;br&gt;
&lt;br&gt;
Is it possible to post the objective? If it's not, you&lt;br&gt;
may want to send the data needed to reproduce the problem to&lt;br&gt;
tech support &lt;a href=&quot;http://www.mathworks.com/support/&quot;&gt;http://www.mathworks.com/support/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
-Marcelo&lt;br&gt;
&lt;br&gt;
David Doria wrote:&lt;br&gt;
&amp;gt; I am using fminunc to try to find the minimum of a function.&lt;br&gt;
&amp;gt;  I plotted the function (it is only 2d) and it seems&lt;br&gt;
&amp;gt; extremely well behaved - visually it there is without a&lt;br&gt;
&amp;gt; doubt a single local min if you start any where near the min&lt;br&gt;
&amp;gt; value (the value is at (20, 0) and there looks to be about a&lt;br&gt;
&amp;gt; 5 unit radius of convergence).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; However, when I run fminunc, I get:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Line search cannot find an acceptable point along the&lt;br&gt;
&amp;gt; current search direction.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The only thing I could think to check is if the gradient was&lt;br&gt;
&amp;gt; somehow 0-ish even though it didn't look like it in the&lt;br&gt;
&amp;gt; plot, but when I output the gradient at the iteration it&lt;br&gt;
&amp;gt; gives the error it is&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Gradient is: &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ans =&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;    -1.2747&lt;br&gt;
&amp;gt;     0.4237&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Does anyone know what else to check to see why line search&lt;br&gt;
&amp;gt; can't find a good point?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Dave</description>
    </item>
  </channel>
</rss>

