multivariate_t
- sherpa.sim.sample.multivariate_t(mean: Sequence[float] | ndarray, cov: ndarray, df: int, size: tuple[int, ...] | None = None, rng: Generator | RandomState | None = None) ndarray[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:
- mean1-D array_like,
lengthN Mean of the N-dimensional distribution
- cov2-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
tupleofints,optional Given a shape of, for example,
(m,n,k),m*n*ksamples are generated, and packed in anm-by-n-by-karrangement. 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,orNone,optional Determines how random numbers are created. If set to None then the routines from
numpy.randomare used, and so can be controlled by callingnumpy.random.seed.
- mean1-D array_like,
- 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.Isthisright?Thisneedstobechecked!Areferencetotheliteraturethebetter
- out