[Numpy-discussion] Polyfit

Simon Palmer simon.palmer@gmail....
Mon Jun 16 16:33:53 CDT 2008

At the risk of uttering a heresy, are you bound to Python for this?  I bet
you could find a C library that will work well, plus it is not a hard
algorithm to code yourself.  I am pretty sure I have used a numerical
recipes algorithm for regression in my distant past.

Also I can't help thinking the idea of forcing your regression fit through
the origin is a of a bit strange thing to do.  Do you want it to pass
through the origin for visualisation purposes?  What if the origin is not a
statistically valid place for the regression fit to pass through?

On Mon, Jun 16, 2008 at 9:25 PM, Charles R Harris <charlesr.harris@gmail.com>

> On Mon, Jun 16, 2008 at 1:47 PM, Chandler Latour <deathicrow@gmail.com>
> wrote:
>> Yes, exactly what I meant.
> Polyfit just fits polynomials, there is no way of fixing the constant to
> zero. Your best bet is to use linalg.lstsq directly to fit the function you
> want.
> Chuck
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080616/29218562/attachment.html 

More information about the Numpy-discussion mailing list