glearn.priors.StudentT.pdf_jacobian#
- StudentT.pdf_jacobian(x)#
Jacobian of the probability density function of the prior distribution.
- Parameters:
- xfloat or array_like[float]
Input hyperparameter or an array of hyperparameters.
- Returns:
- jacfloat or array_like[float]
The Jacobian of the probability density function of the input hyperparameter(s).
See also
Notes
The first derivative of the probability density function is
\[\frac{\mathrm{d}}{\mathrm{d}\theta} p(\theta \vert \nu) = -\frac{\Gamma(\nu')}{\sqrt{\nu \pi} \Gamma(\frac{\nu}{2})} \nu' z^{-\nu'-1} \frac{2\theta}{\nu},\]where \(\nu' = \frac{1 + \nu}{2}\), \(\Gamma\) is the Gamma function, and
\[z = 1 + \frac{\theta^2}{\nu}.\]If
half
is True, the above function is doubled.When an array of hyperparameters are given, it is assumed that prior for each hyperparameter is independent of others.
Examples
Create the Student’ t-distribution with the degrees of freedom \(\nu=4\).
>>> from glearn import priors >>> prior = priors.StudentT(4) >>> # Evaluate the Jacobian of the PDF >>> t = [0, 0.5, 1] >>> prior.pdf_jacobian(t) array([ 0.01397716, 0.00728592, -0. ])