The loc parameter specifies the location. The shape parameter specifies the positive semidefinite shape matrix. The df parameter specifies the degrees of freedom.
In addition to calling the methods below, the object itself may be called as a function to fix the location, shape matrix, and degrees of freedom parameters, returning a "frozen" multivariate t-distribution random.
%(_mvt_doc_callparams_note)s The matrix shape must be a (symmetric) positive semidefinite matrix. The determinant and inverse of shape are computed as the pseudo-determinant and pseudo-inverse, respectively, so that shape does not need to have full rank.
The probability density function for multivariate_t is
f(x) = \frac{\Gamma(\nu + p)/2}{\Gamma(\nu/2)\nu^{p/2}\pi^{p/2}|\Sigma|^{1/2}} \left[1 + \frac{1}{\nu} (\mathbf{x} - \boldsymbol{\mu})^{\top} \boldsymbol{\Sigma}^{-1} (\mathbf{x} - \boldsymbol{\mu}) \right]^{-(\nu + p)/2},
where p is the dimension of \mathbf{x}, \boldsymbol{\mu} is the p-dimensional location, \boldsymbol{\Sigma} the p \times p-dimensional shape matrix, and \nu is the degrees of freedom.
A multivariate t-distributed random variable.
import numpy as np
from scipy.stats import multivariate_t
rv = multivariate_t([1.0, -0.5], [[2.1, 0.3], [0.3, 1.5]], df=2)
# Frozen object with the same methods but holding the given location,
# scale, and degrees of freedom fixed.
import matplotlib.pyplot as plt
x, y = np.mgrid[-1:3:.01, -2:1.5:.01]
pos = np.dstack((x, y))
fig, ax = plt.subplots(1, 1)
ax.set_aspect('equal')
plt.contourf(x, y, rv.pdf(pos))
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them