[SciPy-user] polynomal regression

Christian Meesters meesters at uni-mainz.de
Mon Oct 16 13:16:22 EDT 2006


On Monday 16 October 2006 15:27, A. M. Archibald wrote:
>
> numpy's least-squares fitting procedure will do just what you're
> asking for. I think it's called numpy.lstsqr (but it may have a
> different number of ss and ts). What you really want is probably the
> full covariance matrix, and I think it can give that to you.
Thanks, but I'm not sure what you mean: In my numpy there is no lstsqr in the 
namespace, if I do 'from numpy import *' (fresh download from svn - I needed 
an upgrade anyway).

Perhaps my English prevents me from being understood here ... Another attempt:
Currently what I'm using is scipy.linalg.lstsq for linear regressions (mostly) 
and scipy.polyfit in other cases. For calculating 'errors' / 'deviations' / 
'uncertainties' of the calculated coefficients the function needs the input 
with errors in x & y, right? Is there any such function in scipy?

Christian



More information about the SciPy-User mailing list