Introduction

Least-square regression is a method of curve fitting. It will take a set of data and produce an approximition. More specificlly, it will produce the coefficents to a polynomial that is an approximation of the curve. The degree (or number of coefficents) will determine how accurate the curve can be fit. A degree of 0 is a simple mean average. First degree is the same as linear regression. Second and higher degrees will produce non-linear regression.

Least-square regression requires PHP 5.0 or above, since the code is entirely object-oriented. PHP must be compiled with BC math library.

Note from the author

This is a rather specialized library and I'm not sure how much use there will be for it. However, those doing data analysis in PHP (such as on data from a database) may find this useful. It does include a determinant calculator for square matrices.

The use of BC arbitrary precision arithmetic is almost always necessary for regression of degrees higher then 4, or data sets with thousands of points—the numbers simple get huge.

Unfinished

The software and this site are both unfinished. Keep checking back for updates.

Download

BZip 2 (Linux)

Download release 0.8

MD5: 602a40cfba4de4751edf409a7c3e0854

SHA1: c5495d644e32e7a20f0af812675da6eb96619485

PGP signiture

Zip (Others)

Download release 0.8

MD5: 17ceb039ff4474dcbf86adac8f103753

SHA1: e8e887a8cd504c32cc8c37c4c2b02364b6b44ee3

PGP signiture

License

This software is free, open-source software released under the GNU license.

Author

Least-square regression class is written and maintained by Andrew Que. To get in touch with Andrew Que, visit his contact page