My network has just 90 nodes, and hundreds of edges.
I used the community detection provided by igraph, but the results are
not good.
Are they more fit for the large scale networks?>
Tamas Nepusz 写道:
It depends on whether the community detection routine creates a
dendrogram for you (like fastgreedy.community or
edge.betweenness.community), or a membership vector (like
spinglass.community). Routines like spinglass.community return and R
structure with a field called membership which gives you the community
IDs for each vertex:
cl <- spinglass.community(g)
cl$membership
Routines that build a dendrogram return a merge matrix and you can use
community.to.membership to convert this to a membership vector. E.g.,:
cl <- fastgreedy.community(g)
membership <- community.to.membership(g, cl$merges, steps=which.max(cl$modularity)-1)
membership
--
Best wishes,
Zhijiang Wang
--------------------------------------------
PHD Student
Room 212, Science buliding,
The International WIC Institute,
College of Computer Science and Technology,
Beijing University of Technology,
Beijing, China.
|