netneurotools.metrics.network_covariance_numba

netneurotools.metrics.network_covariance_numba(joint_pmat, D, calc_marginal=True)[source]

Numba version of netneurotools.stats.network_covariance().

Warning

Test before use.

Parameters:
  • joint_pmat ((N, N) array_like) – Joint probability matrix. Please make sure that it is valid.

  • D ((N, N) array_like) – Distance matrix.

  • calc_marginal (bool, optional) – Whether to calculate marginal variance. It will be marginally faster if calc_marginal=False (returning marginal variances as 0). Default: True

Returns:

  • network_covariance (float) – Covariance of joint_pmat on D

  • var_p (float) – Marginal variance of joint_pmat on D. Will be 0 if calc_marginal=False

  • var_q (float) – Marginal variance of joint_pmat on D. Will be 0 if calc_marginal=False