Registered Member
|
Hi,
I'm new here, so please be kind if I make mistakes on the rules. I am trying to use Eigen for eigenvalues and eigenvectors computation. I had troubles making it running, but now it's fine, I have the results I wanted on my first sample (100x10 long double input matrix). On my second sample, I am encountering some difficulties, and I need some informations to find out why. My second sample is starting to be consequent (600x600 long double), but regarding the real data that will be sent to the final program, it's still a bit light. As SelfAdjointEigenSolver is giving up on this sample (NoConvergence), I am asking myself if the problem comes from the size of the sample or from its content. So my question is, is there a limit to the input data size for SelfAdjointEigenSolver and EigenSolver, or is this problem coming from my data? Thanks a lot for the reading. |
Registered Member
|
SelfAdjointEigenSolver should work fine with matrices of this size.
I can guess several reasons why you may get NoConvergence, roughly in order of decreasing likelihood:
|
Moderator
|
I see you are using 'long double'. Have you tried with double? Maybe you just hit this bug:
http://eigen.tuxfamily.org/bz/show_bug.cgi?id=479 |
Registered Member
|
Thanks for your answers
In fact the matrix I use for Eigen is double and notre long double, I tried long double and failed using EigenSolver, and when I moved to SelfAdjointEigenSolver due to the algorithm, I forgot to try to move back to long double. [edit]ggael, I just red the bug you linked and I find it really really near what I encounter, it might be it...[/edit] jitseniesen, when you say "The numbers in your matrix have such a range of scales that the algorithm encounters an Inf." can you explain briefly what it can be? I will check with another solver to see if the problem is only due to Eigen or to the Matrix. I am half reassuring that the solver should work fine with these sizes. Half reassured because it's good to know that it's working, half not reassured because it implies that the data are failling... I will dig |
Registered Member
|
Update.
R is also failling on this matrix, maybe I failed at transfering the data to R, but it's more likely that the problem is coming from the data itself. |
Registered Member
|
The End.
It wasn't the data after all... I made a mistake entering the data in R, and it found the eigen values/vectors. So I tried correcting the bug ggael told about earlier and it worked fine with a max iteration at 60. For future reference, I will have to check how much I have to raise this data to be safe on giant matrix. Thank you all for your time and suggestions. |
Moderator
|
christophed, I'd like to test myself on a similar matrix. Could you output the eigenvalue vector to a file and send it back to me? With 3.1, you can save it this way:
#include <unsupported/Eigen/SparseExtra> saveMarketVector(eig.eigenvalues(), "filename.mtx"); thanks |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]