Re: [Numpy-discussion] Linear least squares

2013-01-09 Thread Till Stensitz
Nathaniel Smith njs at pobox.com writes: An obvious thing is that it always computes residuals, which could be costly; if your pinv code isn't doing that then it's not really comparable. (Though might still be well-suited for your actual problem.) Depending on how well-conditioned your

[Numpy-discussion] Linear least squares

2013-01-08 Thread Till Stensitz
Hi, i did some profiling and testing of my data-fitting code. One of its core parts is doing some linear least squares, until now i used np.linalg.lstsq. Most of time the size a is (250, 7) and of b is (250, 800). Today i compared it to using pinv manually, to my surprise, it is much faster. I