brainconn.reference.randmio_dir

randmio_dir(R, itr)[source]

This function randomizes a directed network, while preserving the in- and out-degree distributions. In weighted networks, the function preserves the out-strength but not the in-strength distributions.

Parameters:
  • W (NxN numpy.ndarray) – directed binary/weighted connection matrix
  • itr (int) – rewiring parameter. Each edge is rewired approximately itr times.
Returns:

  • R (NxN numpy.ndarray) – randomized network
  • eff (int) – number of actual rewirings carried out