src.core.decomp¶
Functions for model decomposition and baseline calculation.
Module Contents¶
- src.core.decomp.get_baseline_breakdown_df(media_mix_model: src.core.mmm_model.DelayedSaturatedMMM, input_data: src.prepro.input_data.InputData, degrees_seasonality: int) pandas.DataFrame¶
Calculates the baseline breakdown DataFrame.
Computes the mean contributions of various components (intercept, seasonality, control variables, etc.) over time based on the fitted model.
- Parameters:
media_mix_model – The fitted media mix model instance.
input_data – The input data object (not directly used in this implementation but kept for potential future use or consistency).
degrees_seasonality – The number of degrees of seasonality used during model fitting (not directly used in this implementation but kept for potential future use).
- Returns:
A DataFrame containing the mean contributions of each component over time, indexed by date.