facebookexperimental / Robyn

Robyn is an experimental, AI/ML-powered and open sourced Marketing Mix Modeling (MMM) package from Meta Marketing Science. Our mission is to democratise modeling knowledge, inspire the industry through innovation, reduce human bias in the modeling process & build a strong open source marketing science community.
https://facebookexperimental.github.io/Robyn/
MIT License
1.13k stars 334 forks source link

Budget Allocator 1 and 2 #892

Closed DongHarry-Kang closed 8 months ago

DongHarry-Kang commented 9 months ago

Hi I am trying to do budget allocation, but I have repeatedly encounter issues; I have used the below methodologies to fix. I would like to report here in case other people also encounter the same error

  1. Buddget Allocator 1: when I used default code,

AllocatorCollect1 <- robyn_allocator( InputCollect = InputCollect, OutputCollect = OutputCollect, select_model = select_model, date_range = NULL, # Default last month as initial period total_budget = NULL, # When NULL, default is total spend in date_range channel_constr_low = 0.7, channel_constr_up = c(1.2, 1.5, 1.5, 1.5, 1.5), channel_constr_multiplier = 3, scenario = "max_response", export = create_files )

The system gave me the below error:

Running budget allocator for model ID 3_175_3 ... check_allocator_constrains(channel_constr_low, channel_constr_up) でエラー: Inputs 'channel_constr_up' and 'channel_constr_low' must have the same length or length 1

Therefore, I changed code of channel channel_constr_up = c(1.2, 1.5, 1.5, 1.5, 1.5) -> 1.3

And then I was able to get the result! :)

gufengzhou commented 8 months ago

Strange, just tested and can't reproduce this error. Please reopen if it happens again

DongHarry-Kang commented 8 months ago

Hi @gufengzhou , I understand the data structure now, now it works. thanks