MMM.sample_response_distribution#

MMM.sample_response_distribution(allocation_strategy, time_granularity, num_periods, noise_level)[source]#

Generate synthetic dataset and sample posterior predictive based on allocation.

Parameters:
allocation_strategyDataArray or dict[str, float]

The allocation strategy for the channels.

time_granularityLiteral[“daily”, “weekly”, “monthly”, “quarterly”, “yearly”]

The granularity of the time units (e.g., ‘daily’, ‘weekly’, ‘monthly’).

num_periodsint

The number of time periods for prediction.

noise_levelfloat

The level of noise to add to the synthetic data.

Returns:
az.InferenceData

The posterior predictive samples based on the synthetic dataset.