{ } Raw JSON

bundles / scipy latest / scipy / stats / _multivariate / matrix_t_gen / rvs

function

scipy.stats._multivariate:matrix_t_gen.rvs

source: /scipy/stats/_multivariate.py :2018

Signature

def   rvs ( self mean = None row_spread = 1 col_spread = 1 df = 1 size = 1 random_state = None )  →  np.ndarray

Summary

Draw random samples from a matrix t distribution.

Parameters

mean : array_like, optional

Mean of the distribution (default: None)

row_spread : array_like, optional

Row-wise 2nd order raw central moment matrix (default: 1)

col_spread : array_like, optional

Column-wise 2nd order raw central moment matrix (default: 1)

df : scalar, optional

Degrees of freedom (default: 1)

size : integer, optional

Number of samples to draw (default 1).

seed : {None, int, np.random.RandomState, np.random.Generator}, optional

Used for drawing random variates. If seed is None, the ~np.random.RandomState singleton is used. If seed is an int, a new RandomState instance is used, seeded with seed. If seed is already a RandomState or Generator instance, then that object is used. Default is None.

Returns

rvs : ndarray or scalar

Random variates of size (size, dims), where dims is the dimension of the random matrices.

Notes

If mean is set to None then a matrix of zeros is used for the mean. The dimensions of this matrix are inferred from the shape of row_spread and col_spread, if these are provided, or set to 1 if ambiguous.

row_spread and col_spread can be two-dimensional array_likes specifying the spread matrices directly. Alternatively, a one-dimensional array will be be interpreted as the entries of a diagonal matrix, and a scalar or zero-dimensional array will be interpreted as this value times the identity matrix.

This method takes advantage of the two equivalent expressions of the probability density function. It samples a Cholesky factor of a random variate of the appropriate inverse Wishart distribution using the smaller of the row/column dimensions.

Aliases

  • scipy.stats._multivariate.matrix_t_gen.rvs