Closed IBMB-MFP closed 11 months ago
Hi @IBMB-MFP,
Indeed this is expected since by random chance it can happen, just remove the duplicates afterwards like this:
rnet = dc.shuffle_net(net, target='target', weight='weight').drop_duplicates(['source', 'target'])
Hope this is helpful!
Hi, using decoupler for python version 1.4.0 I have the problem with the newly added shuffle_net feature. My networks have a large number of targets and when I shuffle them and try to call decouple with the shuffled network, I get the errror:
ValueError: net contains repeated edges, please remove them.
I assume this is because many of the targets are repeated and the shuffling process doesn't ensure that the same target isn't assigned to the same source more than once.