NW-Extension icon indicating copy to clipboard operation
NW-Extension copied to clipboard

is eigenvector centrality defined intra-component?

Open IgnacioOQ opened this issue 6 years ago • 4 comments

I'm doing some exploration and found that if you have three nodes (a) (b)---(c), where (a) is isolated and the other two are connected by an undirected link, then when applying nw:eigenvector-centrality all turtles/nodes receive a value of 1. The manual (http://ccl.northwestern.edu/netlogo/5.0/docs/nw.html#eigenvector-centrality) states that this should report "false" since the network is not connected. My suspicion is that the implementation is measuring the eigenvector of each turtle relative to its component. Am I right? Many thanks!

IgnacioOQ avatar Mar 21 '19 13:03 IgnacioOQ

Your suspicion is correct. However, this was a changed with NetLogo 6 (iirc); I believe you are looking at old documentation there. The current documentation is here: https://ccl.northwestern.edu/netlogo/6.0/docs/nw.html#nw:eigenvector-centrality

The current documentation, however, only states that our implementation should agree with Gephi's, but does not explicitly state that it is normalized relative to each component. It probably should.

qiemem avatar Mar 21 '19 15:03 qiemem

Many thanks! Just to follow up, the normalization secures that "the highest eigenvector centrality a node can have is 1", but the example before also shows that it is not normalizing so that for each component the eigenvector adds up to 1 [i.e. In (b)---(c) both have a value of 1 rather than 1/2] Is this what you meant by "normalized relative to each component"?

IgnacioOQ avatar Mar 21 '19 17:03 IgnacioOQ

Ah, good call. That is ambiguous. For each component, the centralities are normalized so that the largest centrality will be 1; i.e. all centralities are divided by the maximum centrality on their component.

qiemem avatar Mar 21 '19 17:03 qiemem

Thanks again! What about defining a function(v) that uses nw:weak-component-clusters, applies nw:eigenvector-centrality to each of the elements in the list, adds the values up to get the new normalizing parameter k, and divides the given v by k? Or digging into the source code, normalize by suck a k rather than the maximum centrality on their component. In any case, problem solved. Thanks for the quick response!

IgnacioOQ avatar Mar 21 '19 17:03 IgnacioOQ