ammm Core Mixins: Contribution (`contribution.py`)
This module provides the ContributionMixin class, designed to be inherited by Marketing Mix Model (MMM) classes in ammm. It encapsulates methods for calculating and analysing the contributions of different model components (channels, baseline features) to the predicted target variable, based on the model’s posterior distribution (fit_result).
.. automodule:: ammm.core.mixins.contribution :members: :undoc-members: :show-inheritance:(Private helper methods _format_model_contributions and _get_channel_contributions_share_samples are used internally for extracting data from the fit_result and calculating contribution shares across samples, respectively.)