[SciPy-Dev] Least-Squares Linear Solver ( scipy.linalg.lstsq ) not optimal

Nathaniel Smith njs at pobox.com
Mon Jan 19 18:20:51 EST 2015


On Mon, Jan 19, 2015 at 8:55 PM,  <josef.pktd at gmail.com> wrote:
>
> On Mon, Jan 19, 2015 at 3:42 PM, Ralf Gommers <ralf.gommers at gmail.com>
> wrote:
>>
>>
>>
>> On Mon, Jan 19, 2015 at 2:51 PM, <josef.pktd at gmail.com> wrote:
>>
>>
>>>
>>> I suggest you submit a PR to scipy and the linalg developers/maintainers
>>> will look at the details.
>>
>>
>> +1 from me on this. I actually suggest to split it into 2 PRs: one that
>> wraps the LAPACK functions (which is quick to review), and one for the
>> change to lstsq which requires more careful review and testing.
>>
>> Nice performance comparison by the way. Adding that to the PR summary
>> would also be useful.
>
>
> Also, the performance in the first plot looks so good that, IMO, this should
> go into scipy.linalg even if it is/were not a substitute for the current
> lstsq, it could always be a lstsq2.

Obviously this should be available, but does switching lstsq even
matter? IIRC lstsq is going to be pretty slow regardless of what core
algorithm it uses, b/c of the issue with returning residuals. (Plus it
returns singular values, which I don't know if these other algorithms
provide.)

-- 
Nathaniel J. Smith
Postdoctoral researcher - Informatics - University of Edinburgh
http://vorpus.org



More information about the SciPy-Dev mailing list