Open jackkamm opened 9 years ago
@jackkamm I know this is old, but I just saw this issue and am having the same problem. Do you remember if you solved this problem? If so, could you point me to your solution?
@jtliso I have the same problem. Can you help me?
Hi there, nice package.
I'd like to compute the full hosvd of a large sparse tensor. I thought I could use the method tucker.hosvd, but it breaks for me.
Here is a small example:
which results in:
The issue appears to be, if T is a sptensor, then scipy.sparse.linalg.eigsh will be used to get the eigendecomposition of the matrix unfolding. However, eigsh cannot return all eigenvalues. And while eigsh works well for the first few eigenvalues of a large sparse matrix, it appears to works poorly for the lower eigenvalues. (or at least, that is what I have read online about the Implicitly Restarted Lanczos Method, which eigsh uses)
I'd prefer not to convert the sptensor to a dtensor, since the tensor dimensions are quite large.
For now I will just use my own code to get the full hosvd. But I would prefer to have the default of nvecs and hosvd always use scipy.linalg.eigh, with a user option to use eigsh instead. If you like, I can submit a PR with this change.