ammm Core Mixins: Plotting Contribution (plotting_contribution.py)

This module provides the ContributionPlottingMixin class, designed to be inherited by Marketing Mix Model (MMM) classes in ammm. It offers methods to visualise the contributions of various model components (channels, control variables, seasonality, intercept) over time and their relative shares. These plots help in understanding the model’s decomposition of the target variable.

MagicMock is a subclass of Mock with default implementations of most of the magic methods. You can use MagicMock without having to configure the magic methods yourself.

If you use the spec or spec_set arguments then only magic methods that exist in the spec will be created.

Attributes and the return value of a MagicMock will also be MagicMocks.