Replies: 1 comment
-
|
Hello @Aminshnn, Thank you for contacting us! In a national model with no trend ( Feel free to reach out if you have any further questions or suggestions for us. Google Meridian Support Team |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I know that MMM models are not for prediction but they should be used for causal inference. However, I want to set targets for the future. So, given a new dataset, I can get the incremental contribution of paid media variables from the model easily. However, my question is how I can get that for non-media treatment variables and the baseline. Here is how I calculate the kpi obtained from non-media treatment variables. If those values are stored in
raw_input, I use the following code:``
transformer = mmm.non_media_transformer
normalized_data = transformer.forward(raw_input, apply_population_scaling=True)
gamma_gn_samples = mmm.inference_data.posterior['gamma_gn'].values
kpi_scaled = np.einsum('gtn,cdgn->cdgt', normalized_Data, gamma_gn_samples)
kpi_original = mmm.kpi_transformer.inverse(kpi_scaled)
``
I am running the model at national level, so, there is no geo level data.
To check my procedure, I tried to retrieve the baseline value from the trained model (not for the new data). To construct the baseline, I use the following code:
``mu+t = mmm.inference_Data.posterior['mu_t'].values
mu_transformer = mmm.model_xontext.kpi_transformer
kpi_original = mu_transformer.inverse(mu_t)
``
The issue is that when I use this code, the results are different from what I get from
``
media_sumamry =visualizer.MediaSummar(mmm)
media_summary.contribution_metrics(aggregate_times=False, included_non_paid=True)
``
Both codes shows the same patterns but values are different.
I am wondering how I can predict the baseline for the future periods (like the next 6 weeks)? Can I do that based on the trained model? If it is not possible, should I train an ML/time series model to predict the baseline for the future?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions