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

Media transforms prior sampling & curve plotting #722

Closed
wd60622 opened this issue Jun 6, 2024 · 1 comment · Fixed by #734
Closed

Media transforms prior sampling & curve plotting #722

wd60622 opened this issue Jun 6, 2024 · 1 comment · Fixed by #734
Assignees
Labels
enhancement New feature or request MMM

Comments

@wd60622
Copy link
Contributor

wd60622 commented Jun 6, 2024

Following #632, it's easy to build in support for adstock or saturation level sampling and plotting to assess the priors and posteriors independent of a larger models.

For instance, the workflow might be:

from pymc_marketing.mmm import MichaelisMentenSaturation

# Analysis outside of the model
saturation = MichaelisMentenSaturation()
prior: az.Dataset = saturation.sample_prior()
saturation.plot_curve(parameters=prior) 
# Produces saturation curve along some default access

Which could be helpful for analysis of the posterior as well.
For instance,

mmm = MMM(..., saturation=saturation, ...)
mmm.fit(X, y)

# Could be external or used internally as well.
mmm.saturation.plot_curve(parameters=mmm.fit_result)
@juanitorduz
Copy link
Collaborator

Nice 🚀 !

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants