Row-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)
seed : {None, int, np.random.RandomState, np.random.Generator}, optionalUsed for drawing random variates.
If seed is None, the 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.
Methods
pdf(x, mean=None, row_spread=None, col_spread=None) | Probability density function. |
logpdf(x, mean=None, row_spread=None, col_spread=None) | Log of the probability density function. |
rvs(mean=None, row_spread=1, col_spread=1, df=1, size=1, random_state=None) | Draw random samples. |
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.
The spread matrices specified by row_spread and col_spread must be
(symmetric) positive definite. If the samples in X have shape (m,n)
then row_spread must have shape (m,m) and col_spread must have shape (n,n).
Spread matrices must be full rank.
The probability density function for matrix_t is
f(X∣M,Σ,Ω,df)=Γn(2df+n−1)πmn/2(detΣ)n/2(detΩ)m/2Γn(2df+m+n−1)(det(In+(X−M)TΣ−1(X−M)Ω−1))−2df+m+n−1 f(X∣M,Σ,Ω,df)=Γm(2df+n−1)πmn/2(detΣ)n/2(detΩ)m/2Γm(2df+m+n−1)(det(Im+Σ−1(X−M)Ω−1(X−M)T))−2df+m+n−1 where M is the mean,
Σ is the row-wise spread matrix,
Ω is the column-wise matrix,
df is the degrees of freedom,
and Γn is the multivariate gamma function.
These equivalent formulations come from the identity
det(Im+AB)=det(In+BA) for m×n arrays A and BT
and the fact that
γn(df+m)/γn(df)
is equal to
γm(df+n)/γm(df),
where
γm(df)=2m(m−1)/2Γm((df+m−1)/2) denotes a normalized multivariate gamma function.
When df=1 this distribution is known as the matrix
variate Cauchy.
References
Examples