Multinomial random sampling

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Multinomial random sampling

Currurant
I wonder if there is an efficient way to draw multinomial random samples. For
univariate sampling, we can do that for different parameters and desired
shape, but neither of rng nor multinomial function in numpy.random is able
to achieve that. To be specific, can we draw multinomial samples for
different probabilities and different n?

I asked the question on Stackoverflow here:
https://stackoverflow.com/questions/64529620/is-there-an-efficient-way-to-generate-multinomial-random-variables-in-parallel.

Seems like there isn't a function to do that.

Thank you and appreciate numpy,
Daniel



--
Sent from: http://numpy-discussion.10968.n7.nabble.com/
_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Multinomial random sampling

Robert Kern-2
On Thu, Oct 29, 2020 at 5:19 PM Currurant <[hidden email]> wrote:
I wonder if there is an efficient way to draw multinomial random samples. For
univariate sampling, we can do that for different parameters and desired
shape, but neither of rng nor multinomial function in numpy.random is able
to achieve that. To be specific, can we draw multinomial samples for
different probabilities and different n?

I asked the question on Stackoverflow here:
https://stackoverflow.com/questions/64529620/is-there-an-efficient-way-to-generate-multinomial-random-variables-in-parallel.

Seems like there isn't a function to do that.

We call this feature "broadcasting". This is currently being worked on for multinomial and the other multivariate distributions:


--
Robert Kern

_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion