Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Random Multinomial Distribution

Marek_C_
Beginner
236 Views

Hello all,

Just like in the name of the topic, I would like to create function that returns vector of random multinomial distributed values. Unfortunately in MKL there is no direct way to do it. There is only Binomial (viRngBinomial, Reference Manual p. 2585) but since Binomial is just a special case of Multinomial I hope someone maybe was able to create Multinomial based on Binomial.

If so, I would appreciate any good ideas/solutions, how to solve that. I have input vector prepared and expected value, but that's all I was able to do so far.

Thank you all in advance.

Marek

0 Kudos
1 Reply
Andrey_N_Intel
Employee
236 Views

Hello Marek,

Your observation is correct - Intel(R) MKL does not provide multinomial random number generator. Please, have a look at the paper of C.S. Davis "The computer generation of multinomial random variates" published in Computational Statistics & Data Analysis, v16, i2, 1993 for methods of multinomial variate generation. One of them, the conditional distribution method, relies on the modal binomial generator. Implementation of the algorithm is available in GSL library.

Andrey

0 Kudos
Reply