lightweight_mmm
lightweight_mmm copied to clipboard
Cost vs impression
Hi team,
I have some question regarding the model. I would be very happy if you could have a look at them :)
-
In the theory section of the model you say "media channels is a matrix of different media channel activity: typically impressions or costs per time period". In my data I do not have impressions but I only have costs. So, is it still possible to use optimisation tool? If yes, how do we define "prices – An array with shape (n_media_channels,) for the cost of each media channel unit?"
-
As you have suggested the r_hats are all less than 1.1. But in the bottom I see that there are 107 divergencies. What does it mean and what is the definition of r_hat?
-
I know that the "media_effect_hat" is just defined as the coefficient of the media, and how is the second metric defined mathematically?
Hello @muuratjann !
- If you are using spend/cost as your media unit for all channels then your prices will always be an array of 1s. Eg if you have 5 channels
jnp.ones(5)
should do the trick. - I will refer you to a couple resources where you can read both about r_hat and divergences.
- The ROI includes the cost into the contribution calculation in order to calculate Return On Investment. It is calculated the follwoing
roi_hat = sum_unscaled_prediction * media_contribution_hat / unscaled_costs
Thank you a lot @pabloduque0 !
Another question I have: is there a reason why my optimisation algorithm is running forever (media_features.shape=(1200,9), n_time_periods=10, no extra features, 50 parameters in my model)? What are the possible remedies to decrease that?
Our current bounds might be too flexible (which is something we will change soon). So maybe try reducing bounds_lower_pct
and bounds_upper_pct
to 0.05. But its just a guess, I need a bit more info on the specific inputs you are feeding to the function to check.
It could be also related to budget
or prices
values.
Closing due to inactivity, feel free to re-open if there are any questions/issues left.
@pabloduque0 Possible to add information about how to set up the data and model when you only have spend data to the documentation and perhaps add an example in a notebook? I suspect that most users will only have cost data, making the the situation used in the current examples (i.e., separate information on impressions and costs) the exception and not the rule.