pymc-marketing
pymc-marketing copied to clipboard
different results from plot_posterior_predictive when run twice
Hello and thanks for the great library.
When I run mmm.sample_posterior_predictive(mmm.preprocessed_data['X'], extend_idata=True, combined=True)
followed by mmm.plot_posterior_predictive(original_scale=True);
, I get the following plot:
Then, if I run the same code again, I get this plot:
Is this expected?
I am using v0.3.3
Can you share your setup code? Are there any fits as well?
I'm be happy to! Here are a few of the plots/tables used in the example guide as well as my model config (just uniform priors mostly); however, even when I use more informed priors I find this same effect.
All r_hats are 1.01 or 1.
Please let me know if this helps! Glad to share other metrics.
my_model_config = {
"intercept": {"dist": "Uniform", "kwargs": {"lower": 0, "upper": 1}},
"beta_channel": {
"dist": "Uniform",
"kwargs": {"lower": 0, "upper": 1},
},
"alpha": {"dist": "Uniform", "kwargs": {"lower": 0, "upper": 1}},
"lam": {"dist": "Uniform", "kwargs": {"lower": 0, "upper": 1}},
"likelihood": {
"dist": "Normal",
"kwargs": {"sigma": {"dist": "HalfNormal", "kwargs": {"sigma": 2}}},
},
"gamma_control": {"dist": "Uniform", "kwargs": {"lower": 0, "upper": 1}},
"gamma_fourier": {"dist": "Uniform", "kwargs": {"lower": 0, "upper": 1}},
}
Hi @Alcampopiano
Was there additional setup prior to calling sample_posterior_predictive
?
I have not encountered this and the example notebook don't experience this as well.
Would you happen to know if this has been resolved with the later versions?
Hi @wd60622
Thanks very much for checking in.
Unfortunately, I dont have that project anymore—otherwise I'd be happy to try and reproduce.
I suspect that newer versions of pymc-marketing are not affected as you mention but cannot confirm as I switched to using pymc.
Thanks for all the great work!