pymc.HalfStudentT#

class pymc.HalfStudentT(name, *args, rng=None, dims=None, initval=None, observed=None, total_size=None, transform=UNSET, **kwargs)[源代码]#

半学生T对数似然。

此分布的pdf是

\[f(x \mid \sigma,\nu) = \frac{2\;\Gamma\left(\frac{\nu+1}{2}\right)} {\Gamma\left(\frac{\nu}{2}\right)\sqrt{\nu\pi\sigma^2}} \left(1+\frac{1}{\nu}\frac{x^2}{\sigma^2}\right)^{-\frac{\nu+1}{2}}\]

(Source code, png, hires.png, pdf)

../../../_images/pymc-HalfStudentT-1.png

支持

\(x \in [0, \infty)\)

参数:
nu : 类张量floattensor_like of float

自由度,也称为正态参数(nu > 0)。

sigma : 类似张量float, 可选tensor_like 的 python:float, 可选

尺度参数(sigma > 0)。随着 nu 的增加,趋向于标准差(仅在未指定 lam 时需要)。默认为 1。

lam : 类似张量float, 可选tensor_like 的 python:float, 可选

尺度参数 (lam > 0)。随着 nu 的增加,收敛到精度(仅在未指定 sigma 时需要)。默认为 1。

示例

# Only pass in one of lam or sigma, but not both.
with pm.Model():
    x = pm.HalfStudentT('x', sigma=10, nu=10)

with pm.Model():
    x = pm.HalfStudentT('x', lam=4, nu=10)

方法

HalfStudentT.dist(nu[, sigma, lam])

创建一个与 cls 分布相对应的张量变量。