How do I sample randomly based on some probability(wightage)?
bearophileHUGS at lycos.com
bearophileHUGS at lycos.com
Tue May 26 15:25:29 EDT 2009
Sumitava Mukherjee:
>I need to randomly sample from a list where all choices have weights attached to them.<
Like this?
http://code.activestate.com/recipes/498229/
Bye,
bearophile
More information about the Python-list
mailing list