NoAdstock#
- class pymc_marketing.mmm.components.adstock.NoAdstock(l_max=FieldInfo(annotation=NoneType, required=True, description='Maximum lag for the adstock transformation.', metadata=[Gt(gt=0)]), normalize=FieldInfo(annotation=NoneType, required=False, default=True, description='Whether to normalize the adstock values.'), mode=FieldInfo(annotation=NoneType, required=False, default=<ConvMode.After: 'After'>, description='Convolution mode.'), priors=FieldInfo(annotation=NoneType, required=False, default=None, description='Priors for the parameters.'), prefix=FieldInfo(annotation=NoneType, required=False, default=None, description='Prefix for the parameters.'))[source]#
Wrapper around no adstock transformation.
Identity transformation that returns the input unchanged. Useful as a no-op placeholder when carryover is not modelled. Takes no priors.
Methods
NoAdstock.__init__([l_max, normalize, mode, ...])NoAdstock.apply(x, *[, core_dim, idx])Call within a model context.
NoAdstock.from_dict(data)Reconstruct a transformation from a dict.
NoAdstock.function(x, *[, dim])No adstock function.
NoAdstock.plot_curve(curve[, n_samples, ...])Plot curve HDI and samples.
NoAdstock.plot_curve_hdi(curve[, ...])Plot the HDI of the curve.
NoAdstock.plot_curve_samples(curve[, n, ...])Plot samples from the curve.
NoAdstock.sample_curve(parameters[, amount])Sample the adstock transformation given parameters.
NoAdstock.sample_prior([coords])Sample the priors for the transformation.
Set the dims for all priors.
NoAdstock.to_dict([_orig])Convert the adstock transformation to a dictionary.
NoAdstock.update_priors(priors)Update priors for the no adstock transformation.
Return a copy with default prior dims (dims=None) set to
dimsinstead.NoAdstock.with_updated_priors(priors)Return a copy with updated priors.
Attributes
Get the combined dims for all the parameters.
Get the priors for the function.
Mapping from variable name to prior for the model.
Get the priors for the function.
Mapping from parameter name to variable name in the model.