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_strategy
DataArray
ordict
[str
,float
] The allocation strategy for the channels.
- time_granularity
Literal
[“daily”, “weekly”, “monthly”, “quarterly”, “yearly”] The granularity of the time units (e.g., ‘daily’, ‘weekly’, ‘monthly’).
- num_periods
int
The number of time periods for prediction.
- noise_level
float
The level of noise to add to the synthetic data.
- allocation_strategy
- Returns:
az.InferenceData
The posterior predictive samples based on the synthetic dataset.