use eigs
if your data is sparse, or if you are interested in the first k
values. For example,
eigs(A,k)
returns the k largest magnitude eigenvalues. Note that eigs
will be faster only for the first few eigen-values, and will be slower for k > some value (probably 5...)
How to speed up c++ eigen decomposition
-
30-06-2022 - |
Pergunta
I use the MATLAB
to do eigenvalue decomposition, and the dimension of data is about 10000
, so the covariance matrix is 10000*10000
. When I use the eig()
function in MATLAB, it is very slow. Is there any way to speed up the eigenvalue decomposition.
I use the eigenvalue decomposition to do principal component analysis(PCA), so I just use the top K eigenvalues and eigenvectors. There is no need to get all the eigenvalues and eigenvectors. I have tried to use the Intel-MKL
to do eigen decomposition, but when I use the mex
interface, there are some errors. I posted it in the link https://stackoverflow.com/questions/19220271/how-to-use-intel-mkl-for-speed-my-own-matlab-mex-cpp-applications
Please give me some advice, Thanks.
Solução