RoheLab/vsp

Is RSpectra::eigs() more efficient than RSpectra::svds() for symmetric matrices?

alexpghayes opened this issue · 4 comments

Is so, we should take advantage of this. @karlrohe do you know the computational complexities of these things?

Also: if we do this we need to be careful about the which argument and our precise formulation of the Laplacian.

svds just does some fancy re-packaging of eigs (i think). so, use eigs when it is symmetric. use svds when it is not.

I came across this issue by accident, and here is the answer. As Karl said, when the matrix is symmetric, svds() is equivalent to eigs_sym() with one exception: singular values are always nonnegative, so if some eigenvalues are negative, their signs will be moved to the right singular vectors. Despite this difference, the performance of the two functions are almost identical for symmetric matrices.

Thanks @yixuan!