Hi there, I just built an mmm model using DelayedSaturatedMMM… I’m trying to create budget allocation scenario based on this example ()… However, when i called out the code block below, it gave me an error that says ‘DelayedSaturatedMMM’ object has no attribute ‘allocate_budget_to_maximize_response’
Here’s my code:
## Load pre trained model
mmm = DelayedSaturatedMMM.load("direct_mmm_with_lift_test_v2.nc")
total_budget = 1
channels = spend_cols
budget_per_channel = total_budget / len(channels)
initial_budget_dict = {channel: budget_per_channel for channel in channels}
min_budget, max_budget = 0.05, .4
budget_bounds = {channel: [min_budget, max_budget] for channel in channels}
menten_params = mmm.compute_channel_curve_optimization_parameters_original_scale(
method="michaelis-menten"
)
#### the code block below raised an error ####
response = mmm.allocate_budget_to_maximize_response(
budget=total_budget,
num_days=8,
time_granularity="weekly",
budget_bounds=budget_bounds
)