igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Eigenvector centrality


From: Gábor Csárdi
Subject: Re: [igraph] Eigenvector centrality
Date: Wed, 4 Nov 2009 11:01:51 +0100

On Wed, Nov 4, 2009 at 10:58 AM, Tamas Nepusz <address@hidden> wrote:
> 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.

The problem is, that if you start with a random vector, then the
solver is very unstable for (very) sparse graphs. At least this was my
experience, that is why I always call ARPACK with a non-random
starting vector.

Gabor

> --
> Tamas
[...]

-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]