LaplacePrior#

class pymc_marketing.special_priors.LaplacePrior(dims=None, centered=True, **parameters)[source]#

A Laplace prior parameterized by a location and a scale parameter.

Unlike the standard Laplace distribution available through the Prior class, this distribution can optionally be centered or non-centered. A non-centered parameterization can sometimes eliminate sampling problems in hierarchical models.

Parameters:
muPrior, float, int, array_like

The location parameter of the distribution.

bPrior, float, int, array_like

The scale parameter of the distribution.

dimstuple[str, …], optional

The dimensions of the distribution, by default None.

centeredbool, optional

Whether to use the centered parameterization, by default True.

References

Methods

LaplacePrior.__init__([dims, centered])

LaplacePrior.create_variable(name)

Create a variable from the prior distribution.

LaplacePrior.from_dict(data)

Create a SpecialPrior prior from a dictionary.

LaplacePrior.sample_prior([coords, name])

Sample from the prior distribution.

LaplacePrior.to_dict()

Convert the SpecialPrior to a dictionary.