TanhSaturationBaselined#

class pymc_marketing.mmm.components.saturation.TanhSaturationBaselined(priors=None, prefix=None)[source]#

Wrapper around tanh saturation function.

For more information, see pymc_marketing.mmm.transformers.tanh_saturation_baselined().

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

../../_images/pymc_marketing-mmm-components-saturation-TanhSaturationBaselined-1.png

Methods

TanhSaturationBaselined.__init__([priors, ...])

TanhSaturationBaselined.apply(x[, dims])

Call within a model context.

TanhSaturationBaselined.function(x, x0, ...)

Tanh saturation function.

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

Plot curve HDI and samples.

TanhSaturationBaselined.plot_curve_hdi(curve)

Plot the HDI of the curve.

TanhSaturationBaselined.plot_curve_samples(curve)

Plot samples from the curve.

TanhSaturationBaselined.sample_curve([...])

Sample the curve of the saturation transformation given parameters.

TanhSaturationBaselined.sample_prior([coords])

Sample the priors for the transformation.

TanhSaturationBaselined.set_dims_for_all_priors(dims)

Set the dims for all priors.

TanhSaturationBaselined.to_dict()

Convert the transformation to a dictionary.

TanhSaturationBaselined.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.