dimanche 14 mai 2017

How does Python 3.6's random.choices(population, weights, k) work?

In short, what is the underlying algorithm used for this weighted sampling algorithm with replacement? What is the runtime complexity? My guess was alias method, but the docs don't specify, google doesn't come up with anything.




Aucun commentaire:

Enregistrer un commentaire