nw:modularity
nw:modularity
Modularity is a measurement of community structure in the network. It is defined based on the number of in-community links versus the number of between-community links. This primitive takes as input a list of agentsets, where each of the agentsets is one the communities that you’re separating the network into.
This measurement works on undirected, directed, and mixed-directedness networks. In the case of mixed-directedness, undirected links are treated essentially the same as two opposing directed links. It does not take weight into account.
Example:
nw:modularity (list (turtles with [ color = blue ]) (turtles with [ color = red ]))
Take me to the full Networks Extension Dictionary