[SciPy-user] Polyfit may be poorly conditioned

massimo sandal massimo.sandal at unibo.it
Wed Mar 26 12:55:18 EDT 2008


Hi,

I am writing an algorithm that determines the best-fitting polynomial to 
a data set[1]. The algorithm tries to fit polynomials between 1st and 
12th degree, and chooses the polynomial with the least mean square error.

It works really well now, however when it occurs to prefer high-grade 
polynomials (say, 8th-9th grade and more), I often see this warning:

/usr/lib/python2.5/site-packages/numpy/lib/polynomial.py:305: 
RankWarning: Polyfit may be poorly conditioned
   warnings.warn(msg, RankWarning)

I have poor knowledge on polynomial fitting, but if I remember 
correctly, it means that the fit is very sensitive to tiny shifts in the 
data values (unstable)? Should I worry anyway or, as long as it gives me 
sensible results, go along?

Thanks,
Massimo

[1]this is needed to "flatten" the data set from systematic, irregular 
low-frequency interferences.
-- 
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/20080326/da90da5e/attachment.vcf>


More information about the SciPy-User mailing list