Expand description
Random number generation: uniform generators, distribution samplers, quasi-random sequences and Markov chain Monte Carlo.
See the book chapter Random numbers.
Modules§
- distributions
- Transformations of uniform floating point samples [0,1) into the desired distribution,
e.g.
let sample = distribution(&mut rng, other args...). One module per distribution. - histogram
- Fixed-width histograms.
- mcmc
- Markov chain Monte Carlo: random-walk Metropolis-Hastings.
- numpy
- NumPy’s default random generator,
numpy.random.default_rng(seed):SeedSequencemixing of the seed and the PCG64 generator, so that a seeded run here draws the same uniform numbers as NumPy (and as SciPy functions that takerandom_state=seed). - qmc
- Tools for quasi-Monte Carlo sampling, following
scipy.stats.qmc: Latin hypercube samples, the discrepancy of a point set (how far it is from uniform), and scaling between the unit cube and a box. The low-discrepancy sequences themselves, plain or scrambled, areSobolSequenceandHaltonSequence. - quasi_
random - Low-discrepancy (quasi-random) sequences: Sobol and Halton.
- sampling
- Random variate generation from a given density or mass function, after the methods of UNU.RAN
that
scipy.stats.samplingwraps: the alias method and guide-table inversion for discrete distributions, transformed density rejection for log-concave densities, Hermite-interpolated numerical inversion of a distribution function, and the ratio-of-uniforms method. - split_
mix_ 64 - SplitMix64, used to seed larger generators.
- uniform_
generator - xoshiro256plusplus
- The xoshiro256++ generator of Blackman and Vigna.