EMS-TU-Ilmenau / fastmat

A library to build up lazily evaluated expressions of linear transforms for efficient scientific computing.
https://fastmat.readthedocs.io
Apache License 2.0
24 stars 8 forks source link

Use numpy svd as fallback, if power iteration to compute the largest singular value fails #33

Closed JanKirchhofTU closed 5 years ago

JanKirchhofTU commented 6 years ago

Problem

The power iteration to compute the largest Singular Value sometimes fails, if the matrix is badly conditioned leading to two "largest" singular values that have approximately the same value.

Enhancement/Discussion

We could think about using numpy.linalg.svd in that case as a fallback. Obviously, this is not a proper solution for large(r) problem sizes.

SebastianSemper commented 6 years ago

I will incorporate the following: https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.svds.html as soon was we have the scipyLinearOperator stuff in place.

SebastianSemper commented 5 years ago

Done in #43 and #60 . closing.