{ } Raw JSON

bundles / scipy latest / scipy / stats / _multivariate / matrix_t_gen / pdf

function

scipy.stats._multivariate:matrix_t_gen.pdf

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

Signature

def   pdf ( self X mean = None row_spread = 1 col_spread = 1 df = 1 )

Summary

Matrix t probability density function.

Parameters

X : array_like

Quantiles, with the last two axes of X denoting the components.

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)

Returns

pdf : ndarray

Probability density function evaluated at X

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.

Examples

import numpy as np
from scipy.stats import matrix_t
M = np.arange(6).reshape(3,2); M
Sigma = np.diag([1,2,3]); Sigma
Omega = 0.3*np.identity(2); Omega
X = M + 0.1; X
df = 3; df
matrix_t.logpdf(X, mean=M, row_spread=Sigma, col_spread=Omega, df=df)

Aliases

  • scipy.stats._multivariate.matrix_t_gen.pdf