[Numpy-discussion] linear algebra help

josef.pktd@gmai... josef.pktd@gmai...
Mon May 18 10:35:41 CDT 2009

On Mon, May 18, 2009 at 10:55 AM, Charles R Harris
<charlesr.harris@gmail.com> wrote:
> 2009/5/18 Stéfan van der Walt <stefan@sun.ac.za>
>> 2009/5/18 Sebastian Walter <sebastian.walter@gmail.com>:
>> > B = numpy.dot(A.T, A)
>> This multiplication should be avoided whenever possible -- you are
>> effectively squaring your condition number.
> Although the condition number doesn't mean much unless the columns are
> normalized. Having badly scaled columns can lead to problems with lstsq
> because of its default cutoff based on the condition number.
> Chuck

Do you know if any of the linalg methods, np.linalg.lstsq or
scipy.linalg.lstsq, do any normalization internally to improve
numerical accuracy?

I saw automatic internal normalization (e.g. rescaling) for some
econometrics methods, and was wondering whether we should do this also
in stats.models or whether scipy.linalg is already taking care of
this. I have only vague knowledge of the numerical precision of
different linear algebra methods.



More information about the Numpy-discussion mailing list