Jon Cardoso-Silva
Jon Cardoso-Silva

Reputation: 990

How can I generate GN benchmark graphs for community detection in igraph?

I'm using R and igraph package to detect communities in graphs, but I haven't found a precise way of creating graphs with community features like the ones used in several papers about community detection.

I wish I could generate graphs using Girvan-Newman benchmark, so I could specify the k_out and k_in variables (the degree of links outside and inside the communities, respectively) and create such graphs.

Upvotes: 1

Views: 2112

Answers (2)

Gabor Csardi
Gabor Csardi

Reputation: 10825

Use a stochastic blockmodel, http://igraph.org/r/doc/sample_sbm.html.

Upvotes: 1

Vinh-Loc DAO
Vinh-Loc DAO

Reputation: 1

The above link (http://igraph.org/r/doc/sbm.game.html) doesn't work correctly. However, there is a LFR benchmark, which generalize the GN benchmark, available for this purpose. We can find it on https://sites.google.com/site/santofortunato/inthepress2.

The graph outputs of the benchmark can be imported directly into R by functions such as read.table or read.csv. The community information is also available as output of the benchmark. Hence, the community comparision function can be used.

Upvotes: 0

Related Questions