netneurotools.metrics.path_transitivity
- netneurotools.metrics.path_transitivity(D)[source]
Calculate path transitivity.
This function implements path transitivity, calculating the density of local detours (triangles) that are available along the shortest paths between all pairs of nodes.
This function is adapted and optimized from the Brain Connectivity Toolbox.
Warning
Test before use.
- Parameters:
D ((N, N) ndarray) – Weight or connection length matrix. Length matrix is recommended and transform should have been applied.
- Returns:
T_mat – Path transitivity matrix
- Return type:
(N, N) ndarray
References