I am trying to compare network scale modularity scores for my network using various community types. The first types are what are generated algorithmically, such as walktrap. However, I would also like to assign each vertex a community of my choosing and calculate modularity using the assigned communities. I have tried to do this by creating a vector that mimics the output of running member() on a walktrap output. The vector:
>> v = attrib$edgroup
>> names(v) = attrib$vertex
where attrib$edgroup is a column that has my choice of "community" in integer form, and attrib$vertex are the "names" of the vertices in the graph. if I run the following,
>> modularity(graph1,v)
>> modularity(graph1, membership(comms))
What's the best way to do what I'm asking?
Best,
Walter
--
Walter McHugh
Interdisciplinary M.A, Statistical Methods and Data Science
Northeastern University
Boston, MA