Closed ilongshan closed 3 years ago
Closed due to inactivity. Feel free to reopen.
@Afonsocraposo utils.random_fraction is used to select a random fraction of an input list of elements. The input list indx
first is deepcopy to aux
. And then use = aux[:nb]
and unuse = aux[nb:]
are returned. Since aux
is not shuffled, the returned use
and unused
are not random partition of the input list indx
. So
# shuffle
np.random.shuffle(indx)
should be
# shuffle
np.random.shuffle(aux)
to get random partition?
Thank you so much for the explanation @ilongshan You're right! This issue was fixed with commit https://github.com/PIA-Group/BioSPPy/commit/52340610f850f382082136cd645496e22fbdbae5.
@Afonsocraposo Great!. Thanks for the quick response.
In utils.random_fraction, I find the following code,
About the shuffle, should it shuffle
aux
instead ofindex
?