netneurotools.networks.threshold_network
- netneurotools.networks.threshold_network(network, retain=10)[source]
Keep top retain % of connections in network and binarizes.
Uses a minimum spanning tree to ensure that no nodes are disconnected from the resulting thresholded graph
- Parameters:
network ((N, N) array_like) – Input graph
retain ([0, 100] float, optional) – Percent connections to retain. Default: 10
- Returns:
thresholded – Binarized, thresholded graph
- Return type:
(N, N) numpy.ndarray