bundles / scipy latest / scipy / stats / _multivariate / matrix_t_gen / rvs
function
scipy.stats._multivariate:matrix_t_gen.rvs
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, optionalMean of the distribution (default:
None)row_spread: array_like, optionalRow-wise 2nd order raw central moment matrix (default:
1)col_spread: array_like, optionalColumn-wise 2nd order raw central moment matrix (default:
1)df: scalar, optionalDegrees of freedom (default:
1)size: integer, optionalNumber of samples to draw (default 1).
seed: {None, int, np.random.RandomState, np.random.Generator}, optionalUsed for drawing random variates. If seed is
None, the~np.random.RandomStatesingleton is used. If seed is an int, a newRandomStateinstance is used, seeded with seed. If seed is already aRandomStateorGeneratorinstance, then that object is used. Default isNone.
Returns
rvs: ndarray or scalarRandom variates of size (
size,dims), wheredimsis 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