Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6537 Discussions

## Eigenvalue decomposition with CSR sparse matrix Beginner
241 Views

Hi,

at the moment I use dsyevd to compute the eigenvalues and eigenvectors of a large matrix A (n = 22000). This takes about half an hour. I know that they are a lot of zeros in matrix A (90% are zeros). Matrix A is stored as CSR sparse matrix.

- Is there a function to compute the eigenvalues and eigenvectors of a CSR sparse matrix?

- Is there a function to convert a CSR sparse matrix to a band matrix? Then I could use dsbevd.

Regards Michael

4 Replies Moderator
241 Views

yes, since the version 11.0 mkl contains the Extended Eigensolver Routines -- please see reference manual for more details. These routines support CSR format too.

there are no routines convert CSR->Band format, ut there are a number of routines conversion csr<->dense Black Belt
241 Views

Michael W. wrote:

... I use dsyevd to compute the eigenvalues and eigenvectors of a large matrix A (n = 22000). Matrix A is stored as CSR sparse matrix.

There is something amiss here.

1. The ?syevd routines operate on a matrix kept in dense-storage form.
2. You cannot pass a matrix stored in CSR form to such a routine.
3. A banded matrix is sparse, but not vice versa. If you know that the matrix is banded, look for an eigenvalue/vector routine that is tailored to such matrices, rather than to the more general sparse matrix type. Black Belt
241 Views

Michael W. wrote:
A = B x B'

That is very useful information. The eigenvalues of A = B.B' are obtainable from the non-zero singular values of B. There are several routines available to compute the SVD (Singular Value Decomposition) of a dense matrix; see, for example, ?gesvd() in Lapack/MKL. You are probably in need of only the singular values and may look for a routine that allows you to specify that the singular vectors are unwanted. Beginner
241 Views

Hi,

1. What I have as Input is CSR sparse Matrix B (number of rows: 20000, number of columns 100000)

2. Intermediate result A = B x B'

3. Intermediate result V, D = dsyevd(A) where V are the eigenvectors and D are the eigenvalues

4. Intermediate result E: diagonal Matrix. The elements on the diagonal are the inverse values of D.

5. Final Result W = V x E

So if you know a faster to compute W from B, please let me know.

Regards

Michael 