This forum has been archived. All content is frozen. Please use KDE Discuss instead.

EigenSolver limits

Tags: None
(comma "," separated)
christophed
Registered Member
Posts
4
Karma
0

EigenSolver limits

Tue Jul 03, 2012 6:35 pm
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.
jitseniesen
Registered Member
Posts
204
Karma
2

Re: EigenSolver limits

Tue Jul 03, 2012 7:11 pm
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:
  • Your matrix contains NaN (not-a-number) or Inf (infinity).
  • The numbers in your matrix have such a range of scales that the algorithm encounters an Inf.
  • There is a bug in our code.
  • It is not proven that the algorithm converges, so theoretically you could have hit one of the possibilities that it does not.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: EigenSolver limits

Tue Jul 03, 2012 8:03 pm
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
christophed
Registered Member
Posts
4
Karma
0

Re: EigenSolver limits

Tue Jul 03, 2012 10:21 pm
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 :)
christophed
Registered Member
Posts
4
Karma
0

Re: EigenSolver limits

Thu Jul 05, 2012 7:46 am
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.
christophed
Registered Member
Posts
4
Karma
0

Re: EigenSolver limits

Thu Jul 05, 2012 3:17 pm
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.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: EigenSolver limits

Fri Jul 06, 2012 7:32 pm
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


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]