[SciPy-user] Reference to algorithm for matrix rank

Matthieu Brucher matthieu.brucher@gmail....
Fri Oct 10 15:16:05 CDT 2008


2008/10/10 Matthew Brett <matthew.brett@gmail.com>:
> Hi,
>
>> You should get the book _Matrix Computations_ by Golub and van Loan.
>> You actually want tol to be relative to S.max(), not an absolute
>> tolerance. I like this:
>>
>>  np.sum(S > (S.max() * np.finfo(M.dtype).eps)
>
> Thanks a lot - I'll have a look.
>
> I saw that matlab does something like this:
>
> eps = np.finfo(S.dtype).eps
> tol = max(M.shape)*eps*S[0]
>
> but I didn't know why the max(M.shape)...

The bigger the matrix, the bigger the numerical errors are ?

Matthieu
-- 
Information System Engineer, PhD
Website: http://matthieu-brucher.developpez.com/
Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn: http://www.linkedin.com/in/matthieubrucher


More information about the SciPy-user mailing list