netneurotools.modularity.get_modularity_z

netneurotools.modularity.get_modularity_z(adjacency, comm, gamma=1, n_perm=10000, seed=None)[source]

Calculate average z-score of community assignments by permutation.

Parameters:
  • adjacency ((N, N) array_like) – Adjacency (correlation) matrix

  • comm ((N,) array_like) – Community assignment vector splitting N subjects into G groups

  • gamma (float, optional) – Resolution parameter used in original modularity maximization. Default: 1

  • n_perm (int, optional) – Number of permutations. Default: 10000

  • seed ({int, np.random.RandomState instance, None}, optional) – Seed for random number generation. Default: None

Returns:

q_z – Average Z-score of modularity of communities

Return type:

float