[Numpy-discussion] lstsq: masked arrays, weights, scaling, and covariance

Charles R Harris charlesr.harris at gmail.com
Sat Sep 17 14:52:05 EDT 2011

Hi All,

I'd like to start a discussion about modifications to lstsq to accommodate
the new masked arrays and move weights, scaling, and covariance
determination down to a lower common level. This is motivated by Travis'
recent changes to polyfit as well as my own various polynomial fits that
also allow weights. Also, once these features are pushed down to lstsq, it
should be possible to push them down further into a c-wrapper for the LAPACK
routines, which is where I really think they belong in the long run.

Because missing values will effect the std/var/cov in the same way as
weights of zero, I think support for missing values and weights go naturally
together. Support for scaling and covariance are less closely tied, but they
are both features I use all the time in practice and having them available
will be useful.  It might also be nice to change the return signature,
though this would require a new function. I rather like the idea of
returning the coefficients and a dictionary, where everything not a
coefficient gets stuffed into the dictionary. In this regard see also Denis
Laxalde's proposal <http://tinyurl.com/3sbwgxy>, something we might want to
be consistent with.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110917/228ae1a7/attachment.html>

More information about the NumPy-Discussion mailing list