[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Community detection with i-graph
From: |
Tamas Nepusz |
Subject: |
Re: [igraph] Community detection with i-graph |
Date: |
Thu, 07 Apr 2011 11:07:19 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 |
Re-sending my previous message as the list server says that it has not
been delivered;
==================8<==================8<================================
Try these methods of the Graph class first:
http://packages.python.org/python-igraph/igraph.Graph-class.html#community_fastgreedy
http://packages.python.org/python-igraph/igraph.Graph-class.html#community_walktrap
http://packages.python.org/python-igraph/igraph.Graph-class.html#community_spinglass
E.g.:
from igraph import Graph
# generate a random geometric graph
g = Graph.GRG(100, 0.2)
# find its communities
cl = g.community_fastgreedy()
# print the membership vector
print cl.membership
# print the number of communities
print len(cl)
# print the members of community zero
print cl[0]
If your graph contains only a couple of hundreds of vertices, you may
also try this one:
http://packages.python.org/python-igraph/igraph.Graph-class.html#community_edge_betweenness
--
Tamas
On 04/06/2011 05:21 PM, Gino Serpa wrote:
> The community detection part
> Gino
>
>
>> Since my actual graph has 11,000. vertexes I need to play first with
>> finding these communities or clusters in fake smaller graphs. I am
>> not sure what to do first? which igraph commands to use (in
>> python)? Are there any small examples I could study?
> Which part are you interested in? The how-to-generate-fake-graphs part
> or the how-to-detect-communities part?
>