[Top][All Lists]

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

Re: [igraph] Community detection of weighted graphs and weighted modular

From: Gábor Csárdi
Subject: Re: [igraph] Community detection of weighted graphs and weighted modularities
Date: Thu, 12 Apr 2012 11:39:09 -0400


On Thu, Apr 12, 2012 at 8:46 AM, R N <address@hidden> wrote:
> Hi,
> are the examples of community detection presented in
> http://igraph.wikidot.com/community-detection-in-r
> meant for unweighted graphs?

yes, it seems so.

> How can they be modified to use edge
> weights? Is it sufficient to add the
> appropriate parameter, e.g.:

label.propagation.community() does have an argument 'weights'. Please
see the manual:

> ### label.propagation.community
> memberships$`Label propagation` <- label.propagation.community(G, E(G)$weight)
> ### and calculate modularity
> Q <- modularity (G, memberships$`Label propagation`,  E(G)$weight)

modularity() also supports weights:


Gabor Csardi <address@hidden>     MTA KFKI RMKI

reply via email to

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