mkl_random APIs#

The class mkl_random.RandomState exposes sampling from probability distributions while supporting different streams of randomness, also known as basic random number generators.

The basic random number generator is chosen by specifying brng keyword argument to the constructor of mkl.RandomState class.

The list of supported basic random number generators is as follows (also see oneMKL Engines):

  • ‘MT19937’ - the Mersenne Twister pseudo-random number generator (default)

  • ‘SFMT19937’ - the SIMD-oriented Mersenne Twister pseudo-random number generator

  • ‘MT2203’ - the set of 6024 Mersenne Twister pseudo-random number generators

  • ‘R250’ - the 32-bit generalized feedback shift register pseudo-random number generator GFSR(250,103)

  • ‘WH’ - the set of 273 Wichmann-Hill’s combined multiplicative congruential pseudo-random number generators

  • ‘MCG31’ - the 31-bit multiplicative congruential pseudo-random number generator

  • ‘MCG59’ - the 59-bit multiplicative congruential pseudo-random number generator

  • ‘MRG32K3A’ - the combined multiple recursive pseudo-random number generator MRG32k3a

  • ‘PHILOX4X32X10’ - the Philox4x32x10 counter-based pseudo-random number generator

  • ‘NONDETERM’ - the generator with non-deterministic source of randomness (for example, a hardware device)

  • ‘ARS5’ - the ARS5 counter-based pseudo-random number generator based on AES encryption algorithm