<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Scaling with least squares in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Scaling-with-least-squares/m-p/920818#M12947</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am trying to fit some data using higher order polynomials. The data has 15000 points with ranges as below:&lt;/P&gt;
&lt;P&gt;X (independent):&amp;nbsp; Min Value = 100000, Max Value = 6000000&lt;/P&gt;
&lt;P&gt;Y (dependent): Min Val = 150,000, Max Val = 560,000&lt;/P&gt;
&lt;P&gt;I am using the GELS least squares driver (SVD method). For the coefficient matrix, I am scaling each value by the respective column average. I still calculate x^20 for all x observations, then calculate the average and then scale the column values.&lt;/P&gt;
&lt;P&gt;For a polynomial of order 20, I get results from the code and these values differ starting at 2nd or 3rd decimal place, as compared to values obtained using a commercially available statistical analysis software, which give more accurate predictions.&lt;/P&gt;
&lt;P&gt;How can I improve the accuracy of the least squres fit? I see the following issues, but havent found a solution yet:&lt;/P&gt;
&lt;P&gt;1. When I calculate the powers (x^16, x^17...etc), for the coefficient matrix, there may be some precision issues.&lt;/P&gt;
&lt;P&gt;2. Is my scaling correct? Or should I use something like ( x - mean_x)/ (stddev_x) [ I just found this via Google]. In this case, how do I get the correct coefficients back?&lt;/P&gt;
&lt;P&gt;Thank you for your advice.&lt;/P&gt;
&lt;P&gt;-V&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jun 2013 02:40:13 GMT</pubDate>
    <dc:creator>vikrantca</dc:creator>
    <dc:date>2013-06-14T02:40:13Z</dc:date>
    <item>
      <title>Scaling with least squares</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Scaling-with-least-squares/m-p/920818#M12947</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am trying to fit some data using higher order polynomials. The data has 15000 points with ranges as below:&lt;/P&gt;
&lt;P&gt;X (independent):&amp;nbsp; Min Value = 100000, Max Value = 6000000&lt;/P&gt;
&lt;P&gt;Y (dependent): Min Val = 150,000, Max Val = 560,000&lt;/P&gt;
&lt;P&gt;I am using the GELS least squares driver (SVD method). For the coefficient matrix, I am scaling each value by the respective column average. I still calculate x^20 for all x observations, then calculate the average and then scale the column values.&lt;/P&gt;
&lt;P&gt;For a polynomial of order 20, I get results from the code and these values differ starting at 2nd or 3rd decimal place, as compared to values obtained using a commercially available statistical analysis software, which give more accurate predictions.&lt;/P&gt;
&lt;P&gt;How can I improve the accuracy of the least squres fit? I see the following issues, but havent found a solution yet:&lt;/P&gt;
&lt;P&gt;1. When I calculate the powers (x^16, x^17...etc), for the coefficient matrix, there may be some precision issues.&lt;/P&gt;
&lt;P&gt;2. Is my scaling correct? Or should I use something like ( x - mean_x)/ (stddev_x) [ I just found this via Google]. In this case, how do I get the correct coefficients back?&lt;/P&gt;
&lt;P&gt;Thank you for your advice.&lt;/P&gt;
&lt;P&gt;-V&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2013 02:40:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Scaling-with-least-squares/m-p/920818#M12947</guid>
      <dc:creator>vikrantca</dc:creator>
      <dc:date>2013-06-14T02:40:13Z</dc:date>
    </item>
    <item>
      <title>The problem is inherently ill</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Scaling-with-least-squares/m-p/920819#M12948</link>
      <description>&lt;P&gt;The problem is inherently ill-conditioned. Unless you have a good justification, you should not even attempt to fit high-order polynomials (such as 20th degree) to data. The Census example that comes with Matlab illustrates these problems quite well. With degree 3 or 4, the US census data, projected to a couple of years beyond the end of the data, produce reasonable extrapolations. Then one gets greedy and raises the degree, hoping to "improve" the "prediction". Degree 6 may give a prediction that is double the current population figure, whereas degree 8 gives a &lt;STRONG&gt;negative&lt;/STRONG&gt; value. The example Matlab code allows you to display confidence bands on the prediction so that you can appreciate why raising the degree can make the results worse.&lt;/P&gt;
&lt;P&gt;In fact, you should look for a model expression that is better suited to describing the data than a high order polynomial. MKL provides effective routines &amp;nbsp;(?TRNLSP) for fitting model expressions that are nonlinear in the regression parameters.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2013 11:57:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Scaling-with-least-squares/m-p/920819#M12948</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2013-06-14T11:57:35Z</dc:date>
    </item>
    <item>
      <title>Thank you for the response.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Scaling-with-least-squares/m-p/920820#M12949</link>
      <description>&lt;P&gt;Thank you for the response.&lt;/P&gt;
&lt;P&gt;Pls allow me to add some more info.&lt;/P&gt;
&lt;P&gt;I am familiar with the underlying function behavior and am using the polynomial fit strictly for interpolation purposes only. The Y values are essentially a solution of a set of differential equations involving X.&amp;nbsp; I am trying to speed up my calculations by using these polynomial fits so that I dont have to solve the equations.&lt;/P&gt;
&lt;P&gt;So far, I was using this commercial tool, and it works very well. Now I would like to automate the process using MKL so that I can generate these fits on the fly and use them. My challenge is that I cannot get the coefficients to match.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2013 22:20:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Scaling-with-least-squares/m-p/920820#M12949</guid>
      <dc:creator>vikrantca</dc:creator>
      <dc:date>2013-06-14T22:20:51Z</dc:date>
    </item>
    <item>
      <title>I am not acquainted with</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Scaling-with-least-squares/m-p/920821#M12950</link>
      <description>&lt;P&gt;I am not acquainted with "this commercial tool".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post details of what you did to obtain the fit, using a small example; showing code, expected results and actual results will help one to find the source of the problem.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2013 12:04:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Scaling-with-least-squares/m-p/920821#M12950</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2013-06-15T12:04:36Z</dc:date>
    </item>
  </channel>
</rss>

