I. Spatial Community Structure
Community Average Pairwise Spatial Distance: A function to calculate the average pairwise spatial distance between nodes within detected communities.

comm_ave_pairwise_spatial_dist.m | |
File Size: | 2 kb |
File Type: | m |
Community Laterality: A function to calculate the laterality of detected communities. Laterality is a property that can be applied to any network in which each node can be assigned to one of two categories, and within the community detection method, describes the extent to which a community localizes to one category or the other. In neuroscience, an intuitive category is that of the left and right hemispheres, and in this case laterality quantifies the extent to which the identified communities in functional or structural brain networks are localized within a hemisphere or form bridges between hemispheres.
- Reference: Karl W. Doron, Danielle S. Bassett, Michael S. Gazzaniga. Dynamic network structure of interhemispheric coordination. PNAS, 2012, 109 (46) 18627-18628. AND Christian Lohse, Danielle S. Bassett, Kelvin O. Lim, Jean M. Carlson. Resolving Structure in Human Brain Organization: Identifying Mesoscale Organization in Weighted Network Representations. PloS Comp Biol, 2013, 10(10):e1003712.

comm_laterality.m | |
File Size: | 3 kb |
File Type: | m |
Community Radius: A function to calculate the radius of detected communities.
- Reference: Christian Lohse, Danielle S. Bassett, Kelvin O. Lim, Jean M. Carlson. Resolving Structure in Human Brain Organization: Identifying Mesoscale Organization in Weighted Network Representations. PloS Comp Biol, 2013, 10(10):e1003712.

comm_radius.m | |
File Size: | 2 kb |
File Type: | m |
Community Spatial Diameter: A function to calculate the spatial diameter of detected communities. The community spatial diameter is defined as the maximum euclidean distance between all pairs of nodes within a community.

comm_spatial_diameter.m | |
File Size: | 2 kb |
File Type: | m |
Community Spatial Extent: A function to calculate the spatial extent of detected communities. The spatial extent of a community is an inverse estimate of the density of a community and quantifies the area or volume of the community, normalized by the number of nodes within the community.

comm_spatial_extent.m | |
File Size: | 2 kb |
File Type: | m |
II. Strength and Significance of Communities
Significance by Permutation Test: This is a function that uses the permutation test to calculate the significance of clusters in a given community structure.

sig_permtest.m | |
File Size: | 1 kb |
File Type: | m |
Significance by Persistence: This a function that uses the Lumped Markov chain to calculate the significance of clusters in a given community structure. Here we normalize the original definition of persistence by the size of the corresponding cluster.

sig_lmc.m | |
File Size: | 1 kb |
File Type: | m |
III. Dynamic Community Structure
Flexibility coefficient: This function calculates the flexibility coefficient. The flexibility of each node corresponds to the number of times that it changes module allegiance, normalized by the total possible number of changes.
- Reference: Danielle S. Bassett, Nicholas Wymbs, Mason Alexander Porter, Peter Mucha, Jean M. Carlson, Scott T. Grafton. Dynamic reconfiguration of human brain networks during learning. PNAS, 2011, 108(18):7641-6.

flexibility.m | |
File Size: | 2 kb |
File Type: | m |
Cohesion strength: These two functions calculate the cohesion strength, quantifying which flexible changes identified with flexibility.m are characterized by two or more nodes moving from community i to community j (i.e., cohesively).
Disjointedness: These two functions also calculate the disjointedness, quantifying which flexible changes identified with flexibility.m are characterized by a node moving independently from community i to community j (i.e., in a disjointed manner).
Disjointedness: These two functions also calculate the disjointedness, quantifying which flexible changes identified with flexibility.m are characterized by a node moving independently from community i to community j (i.e., in a disjointed manner).
- Reference: Qawi K. Telesford, Arian Ashourvan, Nicholas F. Wymbs, Scott T. Grafton, Jean M. Vettel, Danielle S. Bassett. In Revision (2017).

calc_node_cohesion.m | |
File Size: | 8 kb |
File Type: | m |

calc_node_cohesion_multi.m | |
File Size: | 4 kb |
File Type: | m |
Integration coefficient: This function calculates the integration coefficient for each node of the network. The integration coefficient of a region corresponds to the average probability that this region is in the same network community as regions from other systems.
- Reference: Danielle S. Bassett, Muzhi Yang, Nicholas F. Wymbs, Scott T. Grafton. Learning-Induced Autonomy of Sensorimotor Systems. Nat Neurosci. 2015 May;18(5):744-51. AND Marcelo Mattar, Michael W. Cole, Sharon Thompson-Schill, Danielle S. Bassett. A Functional Cartography of Cognitive Systems. PLoS Comput Biol. 2015 Dec 2;11(12):e1004533.

integration.m | |
File Size: | 1 kb |
File Type: | m |
Recruitment coefficient: This function calculates the recruitment coefficient for each node of the network. The recruitment coefficient of a region corresponds to the average probability that this region is in the same network community as other regions from its own system.
- Reference: Danielle S. Bassett, Muzhi Yang, Nicholas F. Wymbs, Scott T. Grafton. Learning-Induced Autonomy of Sensorimotor Systems. Nat Neurosci. 2015 May;18(5):744-51. AND Marcelo Mattar, Michael W. Cole, Sharon Thompson-Schill, Danielle S. Bassett. A Functional Cartography of Cognitive Systems. PLoS Comput Biol. 2015 Dec 2;11(12):e1004533.

recruitment.m | |
File Size: | 1 kb |
File Type: | m |
Promiscuity coefficient: This function calculates the promiscuity coefficient. The promiscuity of a temporal or multislice network corresponds to the fraction of all the communities in the network in which a node participates at least once.
- Reference: Papadopoulos L, Puckett JG, Daniels KE, Bassett DS. Evolution of network architecture in a granular material under compression. Phys Rev E. 2016 Sep;94(3-1):032908.

promiscuity.m | |
File Size: | 0 kb |
File Type: | m |
Persistence: This function computes the persistence for a given multilayer partition S.
- Reference: "Community detection in temporal multilayer networks, and its application to correlation networks". (http://arxiv.org/abs/1501.00040)

persistence.m | |
File Size: | 0 kb |
File Type: | m |
Relabeling Partitions Across Time: This function requires 3 files: multislice_pair_labeling.m, munkres.m, and pair_labeling.m
- Reference: "Community detection in temporal multilayer networks, and its application to correlation networks". (http://arxiv.org/abs/1501.00040)

multislice_pair_labeling.m | |
File Size: | 0 kb |
File Type: | m |

munkres.m | |
File Size: | 5 kb |
File Type: | m |

pair_labeling.m | |
File Size: | 0 kb |
File Type: | m |
IV. Consensus and Comparison Methods
Consensus Iterative: This function identifies a single representative partition from a set of partitions, based on statistical testing in comparison to a null model. A thresholded nodal association matrix is obtained by subtracting a random nodal association matrix (null model) from the original matrix. The representative partition is then obtained by using a Generalized Louvain algorithm with the thresholded nodal association matrix.
NOTE: This code requires genlouvain.m to be on the MATLAB path.
NOTE: This code requires dependency multislice_static_unsigned.m (also provided below).
NOTE: This code requires genlouvain.m to be on the MATLAB path.
NOTE: This code requires dependency multislice_static_unsigned.m (also provided below).
- Reference: Danielle S. Bassett, Mason A. Porter, Nicholas F. Wymbs, Scott T. Grafton, Jean M. Carlson, Peter J. Mucha. Robust detection of dynamic community structure in networks. Chaos, 2013, 23, 1.

consensus_iterative.m | |
File Size: | 3 kb |
File Type: | m |

multislice_static_unsigned.m | |
File Size: | 0 kb |
File Type: | m |
Consensus Similarity: This function identifies a single representative partition from a set of partitions that is the most similar to the all others. Here, similarity is taken to be the z-score of the Rand coefficient (see zrand.m)
NOTE: This code requires zrand.m to be on the MATLAB path.
NOTE: This code requires zrand.m to be on the MATLAB path.
- Reference: Karl W. Doron, Danielle S. Bassett, Michael S. Gazzaniga. Dynamic network structure of interhemispheric coordination. PNAS, 2012, 109 (46) 18627-18628.

consensus_similarity.m | |
File Size: | 1 kb |
File Type: | m |
Normalized Mutual Information: This function computes the normalized mutual information (normalization taken from from Danon 2005, note other normalizations exist) which is a measure of similarity between two different partitions of community structure. The measure is bounded in [0 1] where 1 implies perfect agreement between partitions. In cases where the number of nodes divided by the number of clusters <~ 100, the adjusted value should be used to correct for chance (see Vinh et al 2010).

normalized_mutual_information.m | |
File Size: | 4 kb |
File Type: | m |
z-Rand: This function calculates the z-score of the Rand similarity coefficient between partitions. The Rand similarity coefficient is an index of the similarity between the partitions, corresponding to the fraction of node pairs identified the same way by both partitions (either together in both or separate in both).
NOTE: This code requires genlouvain.m to be on the MATLAB path.
NOTE: This code requires genlouvain.m to be on the MATLAB path.
- Reference: Comparing community structure to characteristics in online collegiate social networks, A. L. Traud, E. D. Kelsic, P. J. Mucha and M. A. Porter, SIAM Review 53, 526-543 (2011).

zrand.m | |
File Size: | 3 kb |
File Type: | m |
V. Network Statistics
Small-World Propensity: This function calculates the small-world propensity, a measure of small-worldness for weighted graphs that is applicable across graph densities.
- Reference: Sarah Feldt Muldoon, Eric W. Bridgeford, Danielle S. Bassett. Small-world propensity in real-world weighted networks. Sci Rep. 2016 Feb 25;6:22057.

small_world_propensity.m | |
File Size: | 11 kb |
File Type: | m |