MultiDimensionalBudgetOptimizerWrapper.sample_response_distribution#
- MultiDimensionalBudgetOptimizerWrapper.sample_response_distribution(allocation_strategy, noise_level=0.001, additional_var_names=None, include_last_observations=False, include_carryover=True, budget_distribution_over_period=None)[source]#
Generate synthetic dataset and sample posterior predictive based on allocation.
- Parameters:
- allocation_strategy
DataArray
The allocation strategy for the channels.
- noise_level
float
The relative level of noise to add to the data allocation.
- additional_var_names
list
[str
] |None
Additional variable names to include in the posterior predictive sampling.
- include_last_observationsbool
Whether to include the last observations for continuity.
- include_carryoverbool
Whether to include carryover effects.
- budget_distribution_over_period
xr.DataArray
|None
Distribution factors for budget allocation over time. Should have dims (“date”, *budget_dims) where date dimension has length num_periods. Values along date dimension should sum to 1 for each combination of other dimensions. If provided, multiplies the noise values by this distribution.
- allocation_strategy
- Returns:
az.InferenceData
The posterior predictive samples based on the synthetic dataset.