igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Negative eigenvector centrality?


From: Gábor Csárdi
Subject: Re: [igraph] Negative eigenvector centrality?
Date: Thu, 22 Oct 2009 17:49:17 +0200

Nathan,

the eigenvector centrality is defined as the eigenvector of a matrix,
and the opposite of the eigenvector is also an eigenvector. igraph
0.5.2 does not care about the sign of the centrality score, just
returns the result of the eigenvector computation. If you get negative
scores you can just multiply them by -1. As long as either _all_
scores are non-negative or _all_ scores are non-positive, there is no
bug here.

igraph 0.6 makes sure that always a positive vector is returned,
exactly the way suggested above, it just multiplies by -1 if the
scores are negative.

Best,
Gabor

On Thu, Oct 22, 2009 at 5:38 PM, Nathan Cobb <address@hidden> wrote:
> I'm working with a series of large, sparse communication networks
> (v~7-15,00;e~10-30,000) The networks are initially directed but not
> weighted.
>
> Using iGraph 0.52 with the Python interface I'm getting back negative
> Eigenvector centrality scores no matter what I do. The code looks something
> like:
>
> target_graph.add_vertices(len(vertices))
> target_graph = target_graph.add_edges(edges)
> target_graph.to_undirected()
> target_graph.simplify(multiple=False,loops=True)
> eigenvector_centrality = target_graph.eigenvector_centrality(scale=False)
>
> The resulting values seem to range somewhere between -1 and 0 (never
> positive.)
>
> Am I missing something conceptually here, or am I hitting a bug?
>
> Thanks,
>
> - Nate
>
>
> Nathan Cobb, MD | Research Investigator
> T 202-454-5745  F 202-454-5785
> Schroeder Institute for Tobacco Research and Policy Studies
> American Legacy Foundation
> 1724 Massachusetts Avenue, NW, Washington, DC 20036
>
>
>
>
>
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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