randomgen.generator.ExtendedGenerator.standard_wishart

ExtendedGenerator.standard_wishart(df, dim, size=None)

Draw samples from the Standard Wishart and Pseudo-Wishart distributions

Parameters:
dfint

The degree-of-freedom for the simulated Wishart variates.

dimint

The dimension of the simulated Wishart variates.

sizeint or tuple of ints, optional

Output shape, excluding trailing dims. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn, each with shape (dim, dim). The output then has shape (m, n, k, dim, dim). Default is None, in which case a single value with shape (dim, dim) is returned.

rescalebool, optional

Flag indicating whether to rescale the outputs to have expectation identity. The default is True. If rescale is False, then the expected value of the generated variates is df * eye(dim).

Returns:
ndarray

The generated variates from the standard wishart distribution.

See also

wishart

Generate variates with a non-identify scale. Also support array inputs for df.

Notes

Uses the method of Odell and Feiveson [1] when df >= dim. Otherwise variates are directly generated as the inner product of df by dim arrays of standard normal random variates.

References

[1]

Odell, P. L. , and A. H. Feiveson (1966) A numerical procedure to generate a sample covariance matrix. Jour. Amer. Stat. Assoc. 61, 199–203

[2]

Uhlig, H. (1994). “On Singular Wishart and Singular Multivariate Beta Distributions”. The Annals of Statistics. 22: 395–405

[3]

Dıaz-Garcıa, J. A., Jáimez, R. G., & Mardia, K. V. (1997). Wishart and Pseudo-Wishart distributions and some applications to shape theory. Journal of Multivariate Analysis, 63(1), 73-87.