[SciPy-user] Polyfit may be poorly conditioned

massimo sandal massimo.sandal at unibo.it
Mon Mar 31 12:08:16 EDT 2008


Ryan May ha scritto:
> massimo sandal wrote:
>> Gnata Xavier ha scritto:
>>> Quoting :
> Just as it takes 2 points to define a line, it takes 3 points to define 
> a parabola, and n+1 points to define an nth order polynomial.

Of course :)

> Thus, you 
> can define a polynomial that passes through all of your data points. 
> This will produce an RMS error of 0.  However, if you know the points 
> lie along a line, this is clearly not optimal and you are simply fitting 
> the curve to noise in the data.

Yes. What I meant is that if the polynomial algorithm is trying to fit a 
straight line (let's forget about noise) with an high-order polynomial, 
with strictly non-zero coefficients, I wondered if it could be worse, 
numerically, since the best fit requires zero coefficient for anything 
with order > 1.

Of course if we introduce noise, the polyfit will try to intersecate 
noise points, so it couldn't be worse. I understand.

m.
-- 
Massimo Sandal
University of Bologna
Department of Biochemistry "G.Moruzzi"

snail mail:
Via Irnerio 48, 40126 Bologna, Italy

email:
massimo.sandal at unibo.it

tel: +39-051-2094388
fax: +39-051-2094387
-------------- next part --------------
A non-text attachment was scrubbed...
Name: massimo.sandal.vcf
Type: text/x-vcard
Size: 274 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20080331/bb42c974/attachment.vcf>


More information about the SciPy-User mailing list