netneurotools.networks.func_consensus

netneurotools.networks.func_consensus(data, n_boot=1000, ci=95, seed=None)[source]

Calculate thresholded group consensus functional connectivity graph.

This function concatenates all time series in data and computes a group correlation matrix based on this extended time series. It then generates length T bootstrapped samples from the concatenated matrix and estimates confidence intervals for all correlations. Correlations whose sign is consistent across bootstraps are retained; inconsistent correlations are set to zero.

If n_boot is set to 0 or None a simple, group-averaged functional connectivity matrix is estimated, instead.

Parameters:
  • data ((N, T, S) array_like (or a list of S arrays, each shaped as (N, T))) – Pre-processed functional time series, where N is the number of nodes, T is the number of volumes in the time series, and S is the number of subjects.

  • n_boot (int, optional) – Number of bootstraps for which to generate correlation. Default: 1000

  • ci ((0, 100) float, optional) – Confidence interval for which to assess the reliability of correlations with bootstraps. Default: 95

  • seed (int, optional) – Random seed. Default: None

Returns:

consensus – Thresholded, group-level correlation matrix

Return type:

(N, N) numpy.ndarray

References

Mišić, B., Betzel, R. F., Nematzadeh, A., Goni, J., Griffa, A., Hagmann, P., Flammini, A., Ahn, Y.-Y., & Sporns, O. (2015). Cooperative and competitive spreading dynamics on the human connectome. Neuron, 86(6), 1518-1529.