nonuniform sampling with replacement

Jah_Alarm jah.alarm at gmail.com
Sun Mar 21 06:11:05 EDT 2010


I've got a vector length n of integers (some of them are repeating),
and I got a selection probability vector of the same length. How will
I sample with replacement k (<=n) values with the probabilty vector.
In Matlab this function is randsample. I couldn't find anything to
this extent in Scipy or Numpy.

thanks for the help

Alex



More information about the Python-list mailing list