MMM.add_mu_effect#

MMM.add_mu_effect(mu_effect)[source]#

Include MuEffect in model.

Parameters:
mu_effectMuEffect

Any MuEffect Protocol to include in the model.

Returns:
The instance for chaining.

Examples

Add LinearTrend to the MMM.

from pymc_marketing.mmm import MMM, LinearTrend
from pymc_marketing.mmm.additive_effect import LinearTrendEffect

mmm = MMM(...).add_mu_effect(
    LinearTrendEffect(
        trend=LinearTrend(n_changepoints=10),
        prefix="linear_trend",
    )
)