Network Modularity
Evaluate resolution-parameter Newman–Girvan modularity for a supplied binary graph partition; this scores a partition, it does not discover or optimize communities.
Description
Modularity evaluates a supplied network partition by comparing within-community edges with a degree-based expectation.
Modularity evaluates a supplied network partition by comparing within-community edges with a degree-based expectation. Resolution controls that comparison.
The tool returns modularity (modularity); undirectedEdgeCount (undirected edge count); communityCount (community count). Input measurements and model parameters are supplied by the caller; the tool computes the stated summary rather than acquiring those measurements.
When to use Network Modularity
Use Network Modularity when you already have adjacency, communityLabels, resolution and want modularity, undirectedEdgeCount, communityCount. This is useful for checking a supplied calculation, documenting a measurement convention, or comparing observations prepared on the same basis.
How to use Network Modularity and understand its results
- Enter adjacency, communityLabels, resolution using the field table below. Match the units, ordering and data boundaries described in the calculation.
- Run the tool after checking the stated bounds and matching paired observations or categories. A malformed request gives a tool error rather than a usable measurement.
- Read modularity, undirectedEdgeCount, communityCount. Use the calculation and interpretation below to distinguish amounts, ratios, signs and decision flags where applicable.
- Review the supplied parameters and assumptions before using the result in a report or comparing it with another observation.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| adjacency | Adjacency | list of list of number | Required |
| communityLabels | Community labels | list of number | Required |
| resolution | Resolution | number | Required |
Require a binary symmetric loop-free adjacency matrix, nonnegative integer labels and positive resolution. Count edges and distinct supplied labels; reject an edgeless graph.
Q = ΣsameCommunity(Aᵢⱼ−resolution×kᵢkⱼ/(2m))/(2m) The symbols refer to the supplied quantities or generated values described above; unit conversions and comparison boundaries follow the stated implementation.
{
"input": {
"adjacency": [
[
0,
1,
0,
0
],
[
1,
0,
0,
0
],
[
0,
0,
0,
1
],
[
0,
0,
1,
0
]
],
"communityLabels": [
0,
0,
1,
1
],
"resolution": 1
},
"output": {
"modularity": 0.5,
"undirectedEdgeCount": 2,
"communityCount": 2
}
} Limitations and assumptions
Communities are not discovered or optimized. Results depend on resolution and the supplied partition.
Numerical inputs must be finite. The tool checks its declared input shape and calculation constraints; those checks do not verify the quality, calibration or representativeness of the supplied observations.
Alternative or Complementary methods
Network Clustering Coefficient: Compute local clustering, mean including degree<2 zero coefficients, and global transitivity for a binary undirected simple graph. Rich Club Coefficient: Compute unnormalized rich-club coefficients for nodes with degree strictly above each supplied threshold; fewer-than-two-node cases carry an explicit undefined flag.
Methodological background: Complex network measures of brain connectivity: uses and interpretations.1
References
-
Complex network measures of brain connectivity: uses and interpretations — Rubinov and Sporns; NeuroImage
Similar or alternative tools
- Network Clustering Coefficient
Compute local clustering, mean including degree<2 zero coefficients, and global transitivity for a binary undirected simple graph.
- Rich Club Coefficient
Compute unnormalized rich-club coefficients for nodes with degree strictly above each supplied threshold; fewer-than-two-node cases carry an explicit undefined flag.