brainconn.reference.randomizer_bin_und

randomizer_bin_und(R, alpha)[source]

This function randomizes a binary undirected network, while preserving the degree distribution. The function directly searches for rewirable edge pairs (rather than trying to rewire edge pairs at random), and hence avoids long loops and works especially well in dense matrices.

Parameters:
  • A (NxN numpy.ndarray) – binary undirected connection matrix
  • alpha (float) – fraction of edges to rewire
Returns:

R – randomized network

Return type:

NxN numpy.ndarray