decoupler.shuffle_net

decoupler.shuffle_net(net, target=None, weight=None, seed=42, same_seed=True)

Shuffle network to make it random.

Shuffle a given net by targets, weight or both at the same time. If only targets are shuffled, targets will change but the distirbution of weights for each footprint will be preserved. If only weights are shuffled, targets will be the same but the distirbution of weights for each footprint will change. If targets and weights are shuffled at the same time, both targets and weight distirbtion will change for each footprint.

Parameters:
netDataFrame

Network in long format.

targetstr

Column name in net with target nodes.

weightstr

Column name in net with weights.

seedint

Random seed to use.

same_seedbool

Whether to share seed between targets and weights if both are not None.

Returns:
rnetDataFrame

Shuffled network.