lightweight_mmm
lightweight_mmm copied to clipboard
IndexError when using plot_prior_and_posterior, with fit(..., weekday_seasonality = True)
Hello,
I'm trying to plot the prior and posterior distributions of my model's parameters.
When do mmm.fit(..., weekday_seasonality = False), the function mmm.plot_prior_and_posterior(...) plots are returned. When do mmm.fit(..., weekday_seasonality = True), the function mmm.plot_prior_and_posterior(...) Gives an index error. The function plots all parameters, except for the 7-weekday parameters.
IndexError: Too many indices for array: 3 non-None/Ellipsis indices for dim 2.
Am I doing something wrong? Is this a known issue? What more information do you need to examine the issue?
Thanks in advance!
Are you using a geo-model or just a national model (dim 3 or dim 2 media data)?
I'm wondering what mmm.print_summary()
looks like for your model, specifically what the weekday seasonality parameters come out like.
Using national model, I did 500x samples & warmup. summary is attached.
I can not send you the data and code since it is confidential.
However, approximately the same thing happens when running the demo codes available: "end_to_end_demo_with_multiple_geos.ipynb" & "simple_end_to_end_demo.ipynb". when running the end_to_end_demo, with: !pip install --upgrade git+https://github.com/google/lightweight_mmm.git !pip install numpy==1.20.3
AttributeError: 'Figure' object has no attribute '_get_renderer'
@lloydvissers I worry about your model results -- it seems very very poor. Have you plotted the model fit on in-sample data, or does that function also not work? Your r_hat
's are insane: they should all be ~1-1.05 ideally, not in the thousands.
@steven-struglia i'm debugging serval issues, so my code is a bit of a mess. I've new results, maybe some data import was wrong but now the results are better. But the "AttributeError: 'Figure' object has no attribute '_get_renderer'" remains