multivariate_t
- sherpa.sim.sample.multivariate_t(mean, cov, df[, size])[source] [edit on github]
Draw random deviates from a multivariate Student’s T distribution Such a distribution is specified by its mean covariance matrix, and degrees of freedom. These parameters are analogous to the mean (average or “center”), variance (standard deviation, or “width,” squared), and the degrees of freedom of the one-dimensional t distribution.
Changed in version 4.16.0: The rng parameter was added.
- Parameters:
mean (1-D array_like, length N) – Mean of the N-dimensional distribution
cov (2-D array_like, shape (N, N)) – Covariate matrix of the distribution. Must be symmetric and positive semi-definite for “physically meaningful” results.
df (int) – Degrees of freedom of the distribution
size (tuple of ints, optional) – Given a shape of, for example,
(m,n,k)
,m*n*k
samples are generated, and packed in anm
-by-n
-by-k
arrangement. Because each sample isN
-dimensional, the output shape is(m,n,k,N)
. If no shape is specified, a single (N
-D) sample is returned.rng (numpy.random.Generator, numpy.random.RandomState, or None, optional) – Determines how random numbers are created. If set to None then the routines from
numpy.random
are used, and so can be controlled by callingnumpy.random.seed
.
- Returns:
out (ndarray) – The drawn samples, of shape size, if that was provided. If not, the shape is
(N,)
.In other words, each entry
out[i,j,...,:]
is an N-dimensional value drawn from the distribution.Is this right? This needs to be checked! A reference to the literature
the better