How do I sample randomly based on some probability(wightage)?

Jaime Fernandez del Rio jaime.frio at gmail.com
Wed May 27 07:10:05 CEST 2009


On Tue, May 26, 2009 at 8:42 PM, Sumitava Mukherjee
<smukh at cognobytes.com> wrote:
> On May 26, 11:39 pm, Sumitava Mukherjee <sm... at cognobytes.com> wrote:
>
>>>>> [Oh, I forgot to mention. I am looking for sampling without replacement.]

That means that, you'll have to code something that updates the sums
of probabilities after each extraction...

Would there be a smart way of doing this, of just adding the whole
updated list again is the best, or at least good enough?

-- 
(\__/)
( O.o)
( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus
planes de dominación mundial.



More information about the Python-list mailing list