Re: [Numpy-discussion] Linear least squares

2013-01-10 Thread Till Stensitzki
> > QR without column pivoting is a nice option for >"safe" problems, but it doesn't >provide a reliable indication of rank >reduction. I also don't find pinv useful >once the rank goes down, since it relies on > Euclidean distance having relevance in >parameter space and that is seldom a so

Re: [Numpy-discussion] Linear least squares

2013-01-09 Thread Charles R Harris
On Wed, Jan 9, 2013 at 1:29 AM, Till Stensitz wrote: > Nathaniel Smith 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 y

Re: [Numpy-discussion] Linear least squares

2013-01-09 Thread Till Stensitz
Nathaniel Smith 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

Re: [Numpy-discussion] Linear least squares

2013-01-08 Thread Charles R Harris
On Tue, Jan 8, 2013 at 11:17 AM, Till Stensitz wrote: > 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 compare

Re: [Numpy-discussion] Linear least squares

2013-01-08 Thread Nathaniel Smith
On Tue, Jan 8, 2013 at 6:17 PM, Till Stensitz wrote: > 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

Re: [Numpy-discussion] Linear least squares

2013-01-08 Thread josef . pktd
On Tue, Jan 8, 2013 at 1:17 PM, Till Stensitz wrote: > 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). My guess is that thi

[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