Compute the modularity and number communities of graph g, w.r.t. its community structure, obtained through the chosen clustering method.
compute_modularity(g, method = igraph::cluster_louvain, ...)
g | a graph. If the graph is not connected, the largest connected component is selected. |
---|---|
method | default is |
... | additional parameters passed to the chosen igraph clustering
method. The default |
list(Q, N) where:
Qthe modularity
Nthe number of communities
Newman
[igraph::cluster_infomap()]