<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 22 May 2013 02:28:57 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Ian Barber's Blog: Linear Regression in PHP (part 2)]]></title>
      <guid>http://www.phpdeveloper.org/news/17015</guid>
      <link>http://www.phpdeveloper.org/news/17015</link>
      <description><![CDATA[<p>
In <a href="http://phpdeveloper.org/news/16991">a previous post</a> <i>Ian Barber</i> started looking at code you could use to determine linear regression in PHP. In <a href="http://phpir.com/linear-regression-in-php-part-2">part two</a> he restructures the code into a more manageable class rather than the mostly procedural process it was before.
</p>
<blockquote>
In the <a href="http://phpir.com/linear-regression-in-php">last post</a> we had a simple stepping algorithm, and a gradient descent implementation, for fitting a line to a set of points with one variable and one 'outcome'. As I mentioned though, it's fairly straightforward to extend that to multiple variables, and even to curves, rather than just straight lines. For this example I've reorganised the code slightly into a <a href="https://github.com/ianbarber/PHPIR/blob/master/multivagraddec.php">class</a> to make life a little easier, but the main changes are just the hypothesis and learn functions.
</blockquote>
<p>
He restructures the learning method to make it easier to reuse and includes a "scale data" method to compensate for irregularities in the data and compute the variance.
</p>]]></description>
      <pubDate>Wed, 19 Oct 2011 12:40:16 -0500</pubDate>
    </item>
  </channel>
</rss>
