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

Allow for graph visualization of media transformations #1298

Open
wd60622 opened this issue Dec 19, 2024 · 0 comments
Open

Allow for graph visualization of media transformations #1298

wd60622 opened this issue Dec 19, 2024 · 0 comments
Labels
enhancement New feature or request MMM

Comments

@wd60622
Copy link
Contributor

wd60622 commented Dec 19, 2024

I would like to see the graph associated with a transformation. A graphviz or to_graph method
would be the API.

It would also assume dummy dims for all required coords of a model.

from pymc_marketing.mmm import GeometricAdstock

adstock = GeometricAdstock(l_max=12)
G = adstock.to_graph()

The logic that is under the hood would be similar to that of sample_curve combined with calling
pm.model_to_graphviz

Some other examples:

from pymc_marketing.mmm import LogisticSaturation

saturation = LogisticSaturation()
G = adstock.to_graph()
from pymc_marketing.mmm import MediaTransformation

media_transformation = MediaTransformation(
    adstock=adstock, 
    saturation=saturation, 
    dims=(),
)
G = media_transformation.to_graph()

The adstock and saturation graph would be along media spend and media
transformation could be along date. Pretty easy to illustrate either way.

@wd60622 wd60622 added enhancement New feature or request MMM and removed Needs Triage labels Dec 19, 2024
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

No branches or pull requests

1 participant