<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/164246</link>
    <title>MATLAB Central Newsreader - Non-linear regression to find minimum</title>
    <description>Feed for thread: Non-linear regression to find minimum</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The 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>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 21 Feb 2008 13:13:05 -0500</pubDate>
      <title>Non-linear regression to find minimum</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/164246#416535</link>
      <author>Thomas.Courl@gmail.com</author>
      <description>Hi all !&lt;br&gt;
&lt;br&gt;
I need to find the minimum of a multiple variables non-linear discrete&lt;br&gt;
function, and I'm not a mathematician...&lt;br&gt;
&lt;br&gt;
More specifically: I have a few hundreds thousands of data points&lt;br&gt;
(X1,X2,...,Xn,Y) where the Xn are the variables and Y is the result of&lt;br&gt;
the function that I would like to minimize.&lt;br&gt;
&lt;br&gt;
My guess is that the best approach would be to do a non-linear&lt;br&gt;
regression and then find the minimum: would that be the right&lt;br&gt;
approach?&lt;br&gt;
&lt;br&gt;
If yes, is MatLab the right tool to do this?&lt;br&gt;
&lt;br&gt;
Many thanks for your help!&lt;br&gt;
Regards,&lt;br&gt;
Thomas&lt;br&gt;
&lt;br&gt;
PS: my function has 23 variables but, if this is a limitation, I could&lt;br&gt;
reduce it (and have a more rough approach).&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Thu, 21 Feb 2008 21:32:09 -0500</pubDate>
      <title>Re: Non-linear regression to find minimum</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/164246#416673</link>
      <author>Roger Stafford</author>
      <description>Thomas.Courl@gmail.com wrote in message &amp;lt;d6caa3cb-77bd-4e56-801c-&lt;br&gt;
fb7c8da92831@34g2000hsz.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi all !&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I need to find the minimum of a multiple variables non-linear discrete&lt;br&gt;
&amp;gt; function, and I'm not a mathematician...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; More specifically: I have a few hundreds thousands of data points&lt;br&gt;
&amp;gt; (X1,X2,...,Xn,Y) where the Xn are the variables and Y is the result of&lt;br&gt;
&amp;gt; the function that I would like to minimize.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; My guess is that the best approach would be to do a non-linear&lt;br&gt;
&amp;gt; regression and then find the minimum: would that be the right&lt;br&gt;
&amp;gt; approach?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; If yes, is MatLab the right tool to do this?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Many thanks for your help!&lt;br&gt;
&amp;gt; Regards,&lt;br&gt;
&amp;gt; Thomas&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; PS: my function has 23 variables but, if this is a limitation, I could&lt;br&gt;
&amp;gt; reduce it (and have a more rough approach).&lt;br&gt;
-------&lt;br&gt;
&amp;nbsp;&amp;nbsp;This is a difficult question you have posed, Thomas.  It is my guess that &lt;br&gt;
what you need is to be able to find the average gradient in suitably small &lt;br&gt;
neighborhoods within your data.  By gradient I mean a vector consisting of &lt;br&gt;
the set of first partial derivatives of Y with respect to the 23 variables.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;Probably starting with the discrete minimum in Y which you can easily find, &lt;br&gt;
determine a neighborhood of this point which possesses well over 23+1 &lt;br&gt;
points from the given data set, and find the gradient of the least-squares &lt;br&gt;
best-fitting plane to these points using matlab's matrix division (slash or &lt;br&gt;
back slash.)  You can probably devise some function which automatically &lt;br&gt;
determines the size of a 23-dimensional sphere (or ellipsoid?) around a &lt;br&gt;
central point which contains enough points and then computes the best-fit &lt;br&gt;
gradient therein.  Armed with such a function you can hopefully use it in &lt;br&gt;
some steepest descent method to arrive at a true local minimum.  Of course &lt;br&gt;
this gradient will itself be a discrete-valued function since the points are &lt;br&gt;
added or removed discretely as the neighborhood center is moved, so the &lt;br&gt;
steepest descent method you adopt must be able to work properly under &lt;br&gt;
those conditions.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;Note that steepest descent methods can be notoriously slow when &lt;br&gt;
encountering "long valleys" in the data, but with the huge number of variables &lt;br&gt;
involved I doubt if mere hundreds or thousands of data points would suffice &lt;br&gt;
to make such a problem solvable with suitable accuracy having long 23-&lt;br&gt;
dimensional valleys in it.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;Note also that for your problem to be remotely solvable, the underlying &lt;br&gt;
function and its first partial derivatives must be reasonably continuous.  &lt;br&gt;
Crossing "cliffs" and "sharp ridges" would not be nice for a steepest descent &lt;br&gt;
algorithm to encounter.  Also the given data should be reasonably free of &lt;br&gt;
inaccuracies and noise.&lt;br&gt;
&lt;br&gt;
Roger Stafford&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Fri, 22 Feb 2008 18:19:17 -0500</pubDate>
      <title>Re: Non-linear regression to find minimum</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/164246#416877</link>
      <author>Roger Stafford</author>
      <description>"Roger Stafford" &amp;lt;ellieandrogerxyzzy@mindspring.com.invalid&amp;gt; wrote in &lt;br&gt;
message &amp;lt;fpkqkp$jn3$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Thomas.Courl@gmail.com wrote in message &lt;br&gt;
&amp;lt;d6caa3cb-77bd-4e56-801c-&lt;br&gt;
&amp;gt; fb7c8da92831@34g2000hsz.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; I need to find the minimum of a multiple variables non-linear discrete&lt;br&gt;
&amp;gt; &amp;gt; function, and I'm not a mathematician...&lt;br&gt;
&amp;gt; &amp;gt; ........&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;   This is a difficult question you have posed, Thomas.  It is my guess that &lt;br&gt;
--------&lt;br&gt;
&amp;nbsp;&amp;nbsp;Thomas, I wish to retract an important part of the advice I gave you &lt;br&gt;
yesterday.  I spoke of the gradient of a best-fitting plane (hyperplane) &lt;br&gt;
through 24 or more data points in neighborhoods and using some kind of &lt;br&gt;
steepest descent method.  On reflection, it occurs to me that using planes in &lt;br&gt;
this manner is not a good idea.  The minimum Y-value on any section of a &lt;br&gt;
plane cutting through a neighborhood must necessarily lie on the boundary &lt;br&gt;
of that section.  By the very linearity of planes, they can have no interior &lt;br&gt;
minimum.  If one is to do better then the discrete Y-minimum possessed by &lt;br&gt;
the data points themselves, then at least second degree surfaces must be &lt;br&gt;
involved.  For example, with just one X-variable and three data points, a &lt;br&gt;
unique quadratic expression can be found running through the points, and if &lt;br&gt;
it forms an upward curving parabola, it would have a minimum different in &lt;br&gt;
general from the minimum Y of the three points.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;Hence, one can conceive of a procedure analogous to the above single &lt;br&gt;
variable case, applied to the 23 variables.  Unfortunately, there are some &lt;br&gt;
formidable difficulties involved in such an approach.  It requires 300 &lt;br&gt;
coefficients to define a general quadratic expression with 23 variables.  &lt;br&gt;
Finding a best-fitting quadratic surface through a set of N &amp;gt;= 300 points in a &lt;br&gt;
neighborhood would involve the use of matrix division involving an N x 300 &lt;br&gt;
or 300 x N matrix.  That operation in itself can undoubtedly be performed, &lt;br&gt;
but finding out whether such a surface possesses a valid minimum within the &lt;br&gt;
neighborhood seems like a very time-consuming action.  In the case of a &lt;br&gt;
quadratic with two variables, y = Ax1^2+Bx1x2+Cx2^2+Dx1+Ex2+F, it has &lt;br&gt;
a valid minimum somewhere if A&amp;gt;0, C&amp;gt;0, and B^2&amp;lt;4AC.  I have no idea what &lt;br&gt;
criterion would apply to the 300 coefficient case.  Probably one of the non-&lt;br&gt;
linear optimization functions like 'fmincon' or 'quadprog' would be needed, &lt;br&gt;
but I don't know how well these would cope with 300 coefficients nor how &lt;br&gt;
much time would be consumed.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;Presumably, if such a neighborhood minimum were found to lie at or near &lt;br&gt;
its boundary, then the neighborhood location would be shifted in that &lt;br&gt;
direction and the above operation repeated until a valid interior minimum &lt;br&gt;
were found.  &lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;However, in a practical sense, I think the very best thing you can do is to &lt;br&gt;
greatly reduce the number of variables you are dealing with.  Having an &lt;br&gt;
adequate number of data points to properly characterize a function of 23 &lt;br&gt;
variables would in my opinion involve far, far more than the mere hundreds &lt;br&gt;
or thousands you mentioned.  If you imagine for a moment that your X-data &lt;br&gt;
were arranged in a 23-dimensional grid with, say, just four distinct values &lt;br&gt;
occurring along each dimension, that would amount to 4^23 or some 70 &lt;br&gt;
trillion data points needed altogether!&lt;br&gt;
&lt;br&gt;
Roger Stafford&lt;br&gt;
&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
