MichaelisMentenSaturation.update_priors#
- MichaelisMentenSaturation.update_priors(priors)#
Helper to update the priors for a function after initialization.
Uses {prefix}_{parameter_name} as the key for the priors instead of the parameter name in order to be used in the larger MMM.
- Parameters:
- priors
dict Dictionary with the new priors for the parameters of the function.
- priors
Examples
Update the priors for a transformation after initialization.
from pymc_marketing.mmm.components.base import Transformation
class MyTransformation(Transformation): prefix: str = "transformation" function = lambda x, lam: x * lam default_priors = {"lam": {"dist": "Gamma", "kwargs": {"alpha": 3, "beta": 1}}} transformation = MyTransformation() transformation.update_priors( {"transformation_lam": {"dist": "HalfNormal", "kwargs": {"sigma": 1}}} )