I am currently using ramdom.choices
in order to perform a weighted selection from a list of possibilities and probabilities (2 items, to be precise). However, I have been having problems with it, since the function sometimes select the same item twice (I know its unlikely but it happens). I have been searching for this issue and I couldn't find a solution. Does anyone know if there is a possibility of using this or any other weighted choice method without repetitions? Thank you!
jeudi 23 novembre 2017
Python: using random.choices (for weighted choice) without repeated values [on hold]
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire