-
Notifications
You must be signed in to change notification settings - Fork 351
Support HSGP instance for time_varying_media in MMM #1881
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
Conversation
Allow passing an HSGPBase instance (e.g., SoftPlusHSGP) to the time_varying_media argument in MMM, enabling custom latent process dimensions and priors. Update logic to handle both boolean and HSGPBase types, and add tests to verify correct behavior and dimension broadcasting for both single- and multi-dimensional cases.
williambdean
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this looks good. We can follow up with the time_varying_intercept. Just a question about the backward compat side here.
| dims=("date", *self.dims), | ||
| **self.model_config["media_tvp_config"], | ||
| ).create_variable("media_latent_process") | ||
| ).create_variable("media_temporal_latent_multiplier") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will these name changes cause any issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we update the model_version number ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should not bring issues, users can always ping or retrain. But I'll update model version.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1881 +/- ##
==========================================
+ Coverage 91.84% 91.86% +0.01%
==========================================
Files 64 64
Lines 7533 7546 +13
==========================================
+ Hits 6919 6932 +13
Misses 614 614 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Allow passing an HSGPBase instance (e.g., SoftPlusHSGP) to the time_varying_media argument in MMM, enabling custom latent process dimensions and priors. Update logic to handle both boolean and HSGPBase types, and add tests to verify correct behavior and dimension broadcasting for both single- and multi-dimensional cases.
Related Issue
MMMclass #1250Checklist
pre-commit.ci autofixto auto-fix.📚 Documentation preview 📚: https://pymc-marketing--1881.org.readthedocs.build/en/1881/