glearn.priors.Normal.log_pdf#
- Normal.log_pdf(hyperparam)#
Logarithm of the probability density function of the prior distribution.
- Parameters:
- xfloat or array_like[float]
Input hyperparameter or an array of hyperparameters.
- Returns:
- pdffloat or array_like[float]
The logarithm of probability density function of the input hyperparameter(s).
Notes
This function returns
.Multiple hyperparameters:
When an array of hyperparameters
are given, it is assumed that prior for each hyperparameter is independent of others. The output of this function is then the sum of all log-probabilitiesUsing Log Scale:
If the attribute
use_log_scale
is True, it is assumed that the input argument is the log of the hyperparameter, so to convert back to the original hyperparameter, the transformation below is performedExamples
Create the inverse Gamma distribution with the shape parameter
and rate parameter .>>> from glearn import priors >>> prior = priors.InverseGamma(4, 2) >>> # Evaluate the log-PDF >>> prior.log_pdf(t) -17.15935597045384