lightweight_mmm icon indicating copy to clipboard operation
lightweight_mmm copied to clipboard

Cost vs impression

Open muuratjann opened this issue 2 years ago • 1 comments

Hi team,

I have some question regarding the model. I would be very happy if you could have a look at them :)

  1. 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?"

  2. 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? Screenshot 2022-08-12 at 22 30 41

  3. I know that the "media_effect_hat" is just defined as the coefficient of the media, and how is the second metric defined mathematically? Screenshot 2022-08-12 at 22 33 33

muuratjann avatar Aug 12 '22 20:08 muuratjann

Hello @muuratjann !

  1. 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.
  2. I will refer you to a couple resources where you can read both about r_hat and divergences.
  3. 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

pabloduque0 avatar Aug 15 '22 14:08 pabloduque0

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?

muuratjann avatar Aug 16 '22 10:08 muuratjann

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.

pabloduque0 avatar Aug 16 '22 10:08 pabloduque0

Closing due to inactivity, feel free to re-open if there are any questions/issues left.

pabloduque0 avatar Aug 24 '22 10:08 pabloduque0

@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.

mjjohns1 avatar Mar 05 '23 20:03 mjjohns1