netneurotools.modularity.get_modularity_sig

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

Calculate significance of community assignments in comm by permutation.

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

  • comm ((N,) array_like) – Community assignment vector

  • gamma (float) – Resolution parameter used in original modularity maximization

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

  • alpha ((0,1) float, optional) – Alpha level to assess significance. Default: 0.01

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

Returns:

Significance of each community in comm (boolean)

Return type:

ndarray