glearn.priors.Normal.pdf_jacobian#
- Normal.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 \mu, \sigma) = -\frac{1}{\sigma \sqrt{2 \pi}} \frac{z}{\sigma} e^{-\frac{1}{2}z^2},\]where
\[z = \frac{\theta - \mu}{\sigma}.\]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 normal distribution \(\mathcal{N}(1, 3^2)\):
>>> from glearn import priors >>> prior = priors.Normal(1, 3) >>> # Evaluate the Jacobian of the PDF >>> t = [0, 0.5, 1] >>> prior.pdf_jacobian(t) array([ 0.01397716, 0.00728592, -0. ])