LogNormalPrior#
- class gammapy.modeling.models.LogNormalPrior[source]#
Bases:
PriorLog-normal prior.
Log-normal probability density in the parameter value \(x\):
\[-2 \log p(x) = \left(\frac{\ln(x) - \ln(\mu)}{\sigma}\right)^2 + 2 \ln(x) + 2 \ln(\sigma) + \ln(2\pi)\]The \(2 \ln(x)\) term is the Jacobian of the change of variable from \(\ln(x)\) to \(x\), so the minimum is at the mode \(\mu e^{-\sigma^2}\), not at
mu. This is the appropriate density for a Bayesian prior onx. For a gaussian constraint in log space with its minimum atmu, useLogSpaceGaussianPrior.- Parameters:
- mufloat, optional
Median of the distribution. Default is 1.
- sigmafloat, optional
Standard deviation of the natural logarithm of the value. Default is 1.
Attributes Summary
Methods Summary
evaluate(value, mu, sigma)Evaluate -2 times the log-normal log-density at value.
Attributes Documentation
- default_parameters = <gammapy.modeling.parameter.PriorParameters object>#
- mu#
Parameter of a
Prior.A prior is a probability density function of a model parameter and can take different forms, including but not limited to Gaussian distributions and uniform distributions. The prior includes information or knowledge about the dataset or the parameters of the fit.
Examples
For a usage example see Priors tutorial.
- sigma#
Parameter of a
Prior.A prior is a probability density function of a model parameter and can take different forms, including but not limited to Gaussian distributions and uniform distributions. The prior includes information or knowledge about the dataset or the parameters of the fit.
Examples
For a usage example see Priors tutorial.
- tag = ['LogNormalPrior']#
Methods Documentation
- __init__(**kwargs)#
- classmethod __new__(*args, **kwargs)#