AsymmetricGaussianBasis#

class pymc_marketing.mmm.events.AsymmetricGaussianBasis(event_in='after', **kwargs)[source]#

Asymmetric Gaussian bump basis transformation.

Allows different widths (sigma_before, sigma_after) and amplitudes (a_after) after the event.

(Source code, png, hires.png, pdf)

../../_images/pymc_marketing-mmm-events-AsymmetricGaussianBasis-1.png
Parameters:
event_inLiteral[“before”, “after”, “exclude”]

Whether to include the event in the before or after part of the basis, or leave it out entirely. Default is “after”.

priorsdict[str, Prior]

Prior for the sigma_before, sigma_after, a_before, and a_after parameters.

prefixstr

Prefix for the parameters.

Methods

AsymmetricGaussianBasis.__init__([event_in])

AsymmetricGaussianBasis.apply(x[, dims, idx])

Call within a model context.

AsymmetricGaussianBasis.function(x, ...)

Asymmetric Gaussian bump function.

AsymmetricGaussianBasis.plot_curve(curve[, ...])

Plot curve HDI and samples.

AsymmetricGaussianBasis.plot_curve_hdi(curve)

Plot the HDI of the curve.

AsymmetricGaussianBasis.plot_curve_samples(curve)

Plot samples from the curve.

AsymmetricGaussianBasis.sample_curve([...])

Sample the curve of the saturation transformation given parameters.

AsymmetricGaussianBasis.sample_prior([coords])

Sample the priors for the transformation.

AsymmetricGaussianBasis.set_dims_for_all_priors(dims)

Set the dims for all priors.

AsymmetricGaussianBasis.to_dict()

Convert the asymmetric Gaussian basis to a dictionary.

AsymmetricGaussianBasis.update_priors(priors)

Update the priors for a function after initialization.

Attributes

combined_dims

Get the combined dims for all the parameters.

default_priors

function_priors

Get the priors for the function.

lookup_name

model_config

Mapping from variable name to prior for the model.

prefix

variable_mapping

Mapping from parameter name to variable name in the model.