brainconn.reference.randmio_dir_signed

randmio_dir_signed(R, itr)[source]

This function randomizes a directed weighted network with positively and negatively signed connections, while preserving the positive and negative degree distributions. In weighted networks by default the function preserves the out-degree 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