igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] How to see communities after community detection algorithm?


From: Zhijiang Wang
Subject: Re: [igraph] How to see communities after community detection algorithm?
Date: Thu, 19 Nov 2009 22:54:47 +0800
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

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.

reply via email to

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