|
From: | Tamas Nepusz |
Subject: | Re: [igraph] Eigenvector centrality |
Date: | Wed, 4 Nov 2009 09:58:22 +0000 |
Hi Matthew,
I am trying to understand eigenvector centrality, but I'm clearly doing something wrong!No, it seems you are doing everything right and the problem is within the eigenvector centrality calculation. The calculation calls ARPACK behind the scenes to do the hard job, and for some cases (like yours -- in fact, this is the only one we are aware of) it converges to the _second_ largest eigenvalue, not the first one. I tweaked the code yesterday a little bit, and it looks like if I set a random starting vector for ARPACK instead of the present solution (which uses the degree vector as the starting vector), the problem is solved. If you are willing to mess around with the igraph source code, this is the single line you have to change in igraph_eigenvector_undirected in centrality.c:
options->start=0; /* random start vector */ Originally it was: options->start=1; /* no random start vector */I will investigate the issue more in detail and try to come up with a permanent solution soon.
-- Tamas
[Prev in Thread] | Current Thread | [Next in Thread] |