modularity: Calculate modularity of a weighted graph matrix

Description Usage Arguments Value See Also

View source: R/modularity.R

Description

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

Usage

1

Arguments

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

Value

A numeric value of the the modularity

See Also

deltaModularity


yishaishimoni/phenoClust documentation built on May 4, 2019, 5:28 p.m.