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

Support channel per axes in plot_channel_contribution_grid #818

Open
ezjsiwu opened this issue Jul 8, 2024 · 3 comments
Open

Support channel per axes in plot_channel_contribution_grid #818

ezjsiwu opened this issue Jul 8, 2024 · 3 comments
Labels
enhancement New feature or request MMM plots

Comments

@ezjsiwu
Copy link

ezjsiwu commented Jul 8, 2024

Hi there, is it possible to plot each channel contribution in different subplots for the mmm.plot_channel_contribution_grid() ?

https://www.pymc-marketing.io/en/latest/api/generated/pymc_marketing.mmm.delayed_saturated_mmm.DelayedSaturatedMMM.plot_channel_contributions_grid.html

@wd60622
Copy link
Contributor

wd60622 commented Jul 9, 2024

Hi @ezjsiwu

It is not built in functionality even though the plt_kwargs can be passed. ncols or nrows would cause an error. Maybe you'd like to make a PR to add this functionality in?

Also, the data using in the plot is created with the get_channel_contributributions_forward_pass_grid

start = 0
stop = 10
num = 12
contributions: xr.DataArray = mmm.get_channel_contributions_forward_pass_grid(
    start=start, stop=stop, num=num
)

From there, you can create any plot you would like

@wd60622 wd60622 changed the title create individual channel contribution grid plot Support channel per axes in plot_channel_contribution_grid Jul 9, 2024
@wd60622 wd60622 added the enhancement New feature or request label Jul 9, 2024
@ezjsiwu
Copy link
Author

ezjsiwu commented Jul 18, 2024

hey @wd60622 ! thanks for the response.. I was able to create the plots just by extracting the get_channel_contributions_forward_pass_grid() function.. How can i submit a PR on this?

@wd60622
Copy link
Contributor

wd60622 commented Jul 18, 2024

Hi @ezjsiwu
Thank you for your interest in contributing! Juan recommends this resource for getting started: https://www.sktime.net/en/stable/developer_guide/git_workflow.html if you are new to open source.

We have some steps for getting started with pymc-marketing here: https://github.com/pymc-labs/pymc-marketing/blob/main/CONTRIBUTING.md
Beware, we are aware that some steps might be stale.

From your forked pymc-marketing repo's branch, make a PR into pymc-labs/pymc-marketing main branch. The earlier the PR is opened, the better. We are here to help out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request MMM plots
Projects
None yet
Development

No branches or pull requests

2 participants