On Mon, Jun 11, 2012 at 11:53 AM, Alex Garnett <
axf...@gmail.com> wrote:
> Hey guys,
>
> I'm having seemingly no end of trouble trying to get an eigenvector
> centrality algorithm to work on my graph. The regular nX implementation
> gives me an error about failing to converge, and the numpy implementation,
> when called from nX, runs its 100 iterations outputting 0.0 values for every
> node except for one node which is assigned a 1.0 value.
>
> Something is obviously screwed up in my graph, but I've been able to export
> to gexf and open it in Gephi to calculate eigenvector centrality without any
> issues. This, however, is starting to take too long, so I'd really like to
> be able to get this and other metrics out of nX.
>
> My nodes each have 5 properties, one of which is called weight (and is
> effectively degree); my edges each also have a property called weight. I'm
> trying to calculate eigenvector centrality after pruning the graph by
> removing all but the 3000 nodes with the highest degree (using Twitter
> data), as follows:
>
> eigenvector = nx.eigenvector_centrality(g_reduced)
> for n in eigenvector:
> g_reduced.node[n]['eigenvector centrality'] = eigenvector[n]
>