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

josef.pktd at gmail.com josef.pktd at gmail.com
Tue Jan 20 12:47:32 EST 2015


On Tue, Jan 20, 2015 at 12:40 PM, <josef.pktd at gmail.com> wrote:

>
>
> On Tue, Jan 20, 2015 at 12:01 PM, Sturla Molden <sturla.molden at gmail.com>
> wrote:
>
>> Alexander Grigorievskiy <alex.grigorievskiy at gmail.com> wrote:
>>
>> > 3) Indeed, "gelsy" requires the condition number RCOND. Actually,
>> currently
>> >     I pass -1 as the condition number by analogy with "gelss" where it
>> > is assumed
>> >     that machine precision is used if (RCOND < 0). Now I checked the
>> > documentation
>> >     and found out that "gelsy" does not have this default behavior
>> > (although experiments show that it works ok)
>> >     However, I think we can pass machine precision form python if the
>> > user did not provided the
>> >     condition number. I need to test is a bit more.
>> >     It is still the fastest algorithm in most cases.
>>
>> Forgive me if I am ignorant here:
>>
>> Shouldn't you do an SVD first and compute RCOND from the singular values
>> before you call *gelsy?
>>
>> Granted, using an arbitrary RCOND value might work, but it is not how
>> *gelsy is supposed to be used, AFAIK.
>>
>
> Isn't rcond a choice variable for the threshold of considering near
> singular as singular as in pinv ?
> (and not something that is calculated from the data)
>
> The are similar rcond choices, predefined or user given, in other numpy or
> scipy linalg routines.
>
> mostly guessing
>

or not guessing:

rcond

rcond is used to determine the effective rank of A, which is defined as the
order of the largest leading triangular submatrix R11 in the QR
factorization with pivoting of A, whose estimated condition number <
1/rcond.

https://software.intel.com/en-us/node/521113

Josef


>
> Josef
>
>
>
>>
>> Sturla
>>
>> _______________________________________________
>> SciPy-Dev mailing list
>> SciPy-Dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20150120/92460d5d/attachment.html>


More information about the SciPy-Dev mailing list