Description Usage Arguments Value See Also
Modularity is defined as Q=1/(2m) * sum_(i,j)
(Aij-ki*kj/(2m)delta(ci,cj)
. The implementation here
only uses matrix multiplications and is quite efficient.
However, when checking the changes in the modularity it
is more efficient to use deltaModularity
1 | modularity(G, C)
|
G |
a symmetric N-by-N numeric matrix representing the weights of edges between the N nodes |
C |
a vector or factor of length N with numeric or factor assignments |
A numeric value of the the modularity
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.