facebookexperimental / facebookexperimental/Robyn
Reallocate budget on a time window where some media channels have 0 spendings
- Dominant language
- Jupyter Notebook
- Stars
- 1.5k
- Forks
- 433
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to reallocate budget with a few constraints on the media spendings as follow:
- reallocate just digital medias (+/- 30%)
- keep constant non-digital medias
- some of the non-digital medias have 0 spendings in the selected time window
When looking at the report, I see that one non-digital media channel, that has 0 spending, has been reallocated (which should not happen)
Any idea of why is this happening? Thank you in advance
Below the code
```
date_range <- c("2023-01-01", "2023-12-31")
select_model <- OutputCollectX$allSolutions
AllocatorCollect1 <- robyn_allocator(
InputCollect = InputCollectX,
OutputCollect = OutputCollectX,
select_model = select_model,
date_range = date_range,
total_budget = NULL,
channel_constr_low = c(0.7, 0.7, 0.7, 0.7, 0.7, 1, 1, 1, 1, 1),
channel_constr_up = c(1.3, 1.3, 1.3, 1.3, 1.3, 1, 1, 1, 1, 1),
scenario = "max_response",
export = create_files,
plot_folder = RobynRecreated$plot_folder,
)
```
While running I have these warning messages as well:
> Media variables with 0 spending during date range: 'Out_of_home', 'Television_rebrand'
> Excluded variables (coefficients are 0): Out_of_home
Contributor guide
Assessment
This issue has not been assessed yet.