igraph-help
[Top][All Lists]
Advanced

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

[igraph] Calculating measures for a bunch of ego-networks


From: Magnus Torfason
Subject: [igraph] Calculating measures for a bunch of ego-networks
Date: Wed, 05 May 2010 12:29:33 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

Hi all,

I have a (relatively sparse) network of 100K nodes in igraph. Each node has a bunch of attributes, and the edges have some attributes as well.

I've calculated some standard measures on the nodes (degree, constraint, etc) and this has been pretty fast.

However, now I need to calculate some non-standard measures for each node, that might theoretically depend on the attributes of:
  - The attributes of the focal vertex
  - The attributes of the edges of the focal vertex
  - The attributes of the vertices in the immediate neighborhood
  - The ties between the neighbors

So this can be accomplished by looping through the vertices of the graph, extracting the graph.neighborhood(g, 1, i) for each, and manipulating it. However, this takes a long time. Are there any better ways for doing stuff like this?

I think I'm kind of hoping that there is a way of writing a function that takes a vertex ID, and that this can be "applied" to all the vertices of the graph, but in an efficient manner that does not require generating 100K subgraphs.

I guess an alternative way of phrasing the question would be: If I wanted to implement the constraint measure in R code in an efficient manner, could I do it?

Thanks for any help and ideas!

Best,
Magnus




reply via email to

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