MultivariateNormalQMC#
- class scipy.stats.qmc.MultivariateNormalQMC(mean, cov=None, *, cov_root=None, inv_transform=True, engine=None, rng=None)[source]#
- QMC sampling from a multivariate Normal \(N(\mu, \Sigma)\). - Parameters:
- meanarray_like (d,)
- The mean vector. Where - dis the dimension.
- covarray_like (d, d), optional
- The covariance matrix. If omitted, use cov_root instead. If both cov and cov_root are omitted, use the identity matrix. 
- cov_rootarray_like (d, d’), optional
- A root decomposition of the covariance matrix, where - d'may be less than- dif the covariance is not full rank. If omitted, use cov.
- inv_transformbool, optional
- If True, use inverse transform instead of Box-Muller. Default is True. 
- engineQMCEngine, optional
- Quasi-Monte Carlo engine sampler. If None, - Sobolis used.
- rngnumpy.random.Generator, optional
- Pseudorandom number generator state. When rng is None, a new - numpy.random.Generatoris created using entropy from the operating system. Types other than- numpy.random.Generatorare passed to- numpy.random.default_rngto instantiate a- Generator.- Changed in version 1.15.0: As part of the SPEC-007 transition from use of - numpy.random.RandomStateto- numpy.random.Generator, this keyword was changed from seed to rng. For an interim period, both keywords will continue to work, although only one may be specified at a time. After the interim period, function calls using the seed keyword will emit warnings. Following a deprecation period, the seed keyword will be removed.
 
 - Examples - >>> import matplotlib.pyplot as plt >>> from scipy.stats import qmc >>> dist = qmc.MultivariateNormalQMC(mean=[0, 5], cov=[[1, 0], [0, 1]]) >>> sample = dist.random(512) >>> _ = plt.scatter(sample[:, 0], sample[:, 1]) >>> plt.show()   - Methods - random([n])- Draw n QMC samples from the multivariate Normal.