igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] on VertexClustering


From: Claudio Martella
Subject: Re: [igraph] on VertexClustering
Date: Fri, 23 Dec 2011 11:38:35 +0100

thanks for your answer.

I must admit it's quite difficult to understand how things are grouped
in igraph, have you thought of using packages like graph_tool, i.e.
clustering, community, stats etc.?



On Thu, Dec 22, 2011 at 7:22 PM, Tamás Nepusz <address@hidden> wrote:
> Hello,
>
>> I'm trying to get some graph clustering done, so I create a graph from
>> my graphml and try to run VertexClustering.
> VertexClustering is just a data structure, not a particular clustering 
> algorithm. VertexClustering instances are returned by several graph 
> clustering methods, but they are all implemented as methods of the Graph 
> class. Look for methods starting with "community_" in the Graph class to get 
> a rough idea of the available algorithms.
>
> E.g.:
>
>>>> g = igraph.Graph.Read_GraphML("myfile.xml")
>>>> cl = g.community_fastgreedy()
>>>> print type(cl)
> igraph.clustering.VertexClustering
>>>> print cl.membership
>
> Some clustering algorithms return a VertexDendrogram instead of a 
> VertexClustering, but since VertexDendrogram is derived from VertexClustering 
> in igraph 0.5, you can still use its "membership" property.
>
> By the way, if you want to construct a VertexClustering by hand, you need two 
> arguments: the first argument specifies the graph, the second argument is the 
> membership vector (i.e. the cluster index for each vertex).
>
> Cheers,
> T.
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help



-- 
   Claudio Martella
  address@hidden



reply via email to

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