I am coding using C/C++, and try to do sampling with replacement based on the sampling probability.
Considering the running performance, I try to use Intel MKL. However, I only find random sampling without replacement http://ift.tt/2gtYWVM. I did not find random sampling with replacement. To get random sampling with replacement, I can call random sampling without replacement many times and get only one sample each time, which I think may run a bit slowly.
Then, is there 'random sampling with replacement' in MKL? or other strategy can fast run 'random sampling with replacement'?
All experiments are done in only one thread.
Aucun commentaire:
Enregistrer un commentaire