LogNormalPositiveParam#
- class pymc_marketing.special_priors.LogNormalPositiveParam(dims=None, centered=True, **parameters)[source]#
A specialized implementation of a log normal distribution.
Like the LogNormal distribution, this distribution has support over the positive numbers. However, unlike the lognormal, the parameters are also specified in the positive domain.
The other advantage of this prior is in constructing hierarchical models. It allows users to toggle between centered and non-centered parameterizations. This enables rapid iteration when searching for a parameterization that samples efficiently.
- Parameters:
- mu
Prior
,float
,int
, array_like The mean of the distribution.
- sigma
Prior
,float
,int
, array_like The standard deviation of the distribution.
- dims
tuple
[str
, …], optional The dimensions of the distribution, by default None.
- centeredbool, optional
Whether the distribution is centered, by default True.
- mu
Examples
Build a non-centered hierarchical model where information is shared across geos.
Methods
LogNormalPositiveParam.__init__
([dims, centered])Create a variable from the prior distribution.
Create a LogNormalPositiveParam prior from a dictionary.
Sample from the prior distribution.
Convert the prior distribution to a dictionary.