Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering of several plots not working! #310

Open
titubs opened this issue Mar 8, 2024 · 3 comments
Open

Rendering of several plots not working! #310

titubs opened this issue Mar 8, 2024 · 3 comments

Comments

@titubs
Copy link

titubs commented Mar 8, 2024

Hello,
I am using the google provided example code from their github and oddly, when I plot plot.plot_prior_and_posterior(media_mix_model=mmm), the output cart renders perfectly find. However, when I run other plots like plot.plot_media_channel_posteriors(media_mix_model=mmm) or plot.plot_model_fit(mmm, target_scaler=target_scaler), my output shows Out[33]: <Figure size 640x480 with 1 Axes>

Why is this part inconsistent and how can I make all plots render? I tried already adding %matplotlib inline but it did not help. My coding env is Databricks, Phython notebook.

Any advise is appreciated, Thanks.

@anantp316
Copy link

Here are the following checks you may need to do.

  1. Importing matplotlib.pyplot as plt.
  2. Importing the following statement from lightweight_mmm import plot
  3. Try adding a semi-colon at the end of your mentioned plot statements.

If nothing works, try doing a clean install of the lightweight_mmm library and use the git link mentioned in the example notebook (or in the ReadME) to re-install the library.

@gerdasm
Copy link

gerdasm commented Sep 17, 2024

As stated by anantp316, add semi-colon at the end:
plot.plot_media_channel_posteriors(media_mix_model=mmm);

@tabbyduenger
Copy link

Hi, I'm also having trouble rendering these plots: plot.plot_prior_and_posterior() and plot.plot.plot_media_channel_posteriors(). Getting a ValueError: Multi-dimensional indexing (e.g. obj[:, None]) is no longer supported. Convert to a numpy array before indexing instead for the first and TypingError: Failed in nopython mode pipeline (step: nopython frontend) for the second.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants