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.
The budget allocator does not run correctly for a model if the model has no non-zero coefficients for any channel and some channels are forced to zero via the constraints. --> relevant code here:
In the below code channel_for_allocation is a vector that stores the channels with either 0 coefs (zero_coef_channel) or 0 constraints (zero_coef_channel). These channels are supposed to be ignored for the budget allocation.
This code if (length(zero_coef_channel) > 0) {...} is only executed if there are 0 coef channels. If all channels are non-zero, it does not get executed, even if some channels should be forced to 0 via the constraints.
Issue
The budget allocator does not run correctly for a model if the model has no non-zero coefficients for any channel and some channels are forced to zero via the constraints. --> relevant code here:
In the below code
channel_for_allocation
is a vector that stores the channels with either 0 coefs (zero_coef_channel
) or 0 constraints (zero_coef_channel
). These channels are supposed to be ignored for the budget allocation.This code
if (length(zero_coef_channel) > 0) {...}
is only executed if there are 0 coef channels. If all channels are non-zero, it does not get executed, even if some channels should be forced to 0 via the constraints.Proposed Solution
I think here it should therefore rather be:
if (length(zero_coef_channel) > 0 | length(zero_constraint_channel) > 0) {...}