|
From: | Salvatore Palomino |
Subject: | Re: [igraph] How to Create a Weight List using Python for Modularity() |
Date: | Sun, 23 Feb 2014 12:01:57 -0800 |
> I am trying to use modularity(), but i don't know how to create a weight list for the WEIGHT parameter. How can you do this?If the edges of your graph already have a “weight” edge attribute, just use that:
q = g.modularity(membership, weights=g.es[“weight”])
Otherwise, construct a list where item i is the weight of edge i and use that.
T.
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
[Prev in Thread] | Current Thread | [Next in Thread] |