4
votes

I have a large igraph object 70,000+ vertices (nodes) and 200,000+ edges (connections). I'd like to calculate some measures of centrality but the network is too big. I thought a good work around would be to break my network into connected components (even the largest isn't too big).

I was thinking about using the igraph function clusters or related methods. Could I then calculate alpha.centrality() and bonpow() on the clusters? and then merge the results back into the original igraph object? (or a dataframe with all vertices)

I'm not sure of the best approach and I'd be really interested to hear any ideas people have. Many thanks :)

1
Without a full understanding of your structure it's hard to say, but if each node was an element in a list() you could use llply() and walk away from the computer for a bit :) - Brandon Bertelsen
@Brandon do you mean that each italic_connected component_italic is an element in a list? Since the functions I'm referring to need to be computed on the largest connected component that each node is a part of. - Michael Bishop

1 Answers

4
votes

You can use the decompose.graph function in igraph to obtain a list of the connected components, then use lapply to run your function (alpha.centrality or bonpow) on each of the components. After having run decompose.graph, you may want to deallocate your original graph to re-claim some memory.