-
Notifications
You must be signed in to change notification settings - Fork 201
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
MultiDimensional Media Mix Model (New PR) #1036
base: main
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1036 +/- ##
===========================================
- Coverage 95.59% 34.93% -60.67%
===========================================
Files 39 41 +2
Lines 4066 4291 +225
===========================================
- Hits 3887 1499 -2388
- Misses 179 2792 +2613 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
@cetagostini I've been experimenting with this new feature and came across a potential bug. When trying to use partial pulling across a geo dim, I am running into a broadcasting error. Looking like its throwing that error when creating the
However, modifying that to include the dims being passed to the
fixes the broadcasting error and I was able to fit the model from there. Here's the full traceback - @wd60622
|
Good catch @tim-mcwilliams @cetagostini You can do checks on the dims in the priors at initialization in order to catch errors earlier if needed |
@wd60622 thanks! Correct, with the fix I was able to get the model working. |
"Normal", sigma=Prior("HalfNormal", sigma=2), dims=self.dims | ||
), | ||
"gamma_control": Prior("Normal", mu=0, sigma=2, dims="control"), | ||
"gamma_fourier": Prior("Laplace", mu=0, b=1, dims="fourier_mode"), |
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.
Adding *self.dims
to gamma_fourier
should enable the modeler to capture seasonality at each dim they specifiy. For example, dims=(*self.dims, "fourier_mode")
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.
However, this makes the dims for the media match seasonality. The user can always specify with the model config.
Therefore, I lean away from this
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.
@wd60622 yea, good point there! Best to leave the default config be.
Description
Creating an API to support multiple dims.
Related Issue
Checklist
Modules affected
Type of change
📚 Documentation preview 📚: https://pymc-marketing--1036.org.readthedocs.build/en/1036/