Multiplicative MMM (Log and Log-Log Models)#2477
Conversation
PR SummaryMedium Risk Overview Updates contribution/decomposition APIs to be link-aware: Written by Cursor Bugbot for commit a4fff27. This will update automatically on new commits. Configure here. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2477 +/- ##
==========================================
+ Coverage 93.86% 93.91% +0.05%
==========================================
Files 90 92 +2
Lines 13959 14127 +168
==========================================
+ Hits 13102 13267 +165
- Misses 857 860 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
@BugBot review |
|
@BugBot review |
|
View / edit / reply to this conversation on ReviewNB ErikRingen commented on 2026-04-08T09:50:47Z I'm concerned that, in the log-log model, \beta will be quite far from an elasticity because the input spend (x) is scaled by its max, and therefore the log1p(x) will in practice never be a good approximation of log(x). |
|
View / edit / reply to this conversation on ReviewNB ErikRingen commented on 2026-04-08T09:50:48Z works for the mean contribution due to linearity of expectations, but I think it would prevent confusion to instead write the contribution as the expectation of the difference because (1) that is what is actually done in |
|
View / edit / reply to this conversation on ReviewNB ErikRingen commented on 2026-04-08T09:50:48Z I find it a bit confusing to call the intercept a "residual" scaling factor. Also, while I get the maths of defining the intercept contribution this way, would it be more natural/in-line with how users want to interpret the contribution this to define it as: exp(a) * s? |
|
View / edit / reply to this conversation on ReviewNB ErikRingen commented on 2026-04-08T09:50:49Z This is not correct: "Note: Under the default scaling pipeline, channel data is divided by |
|
View / edit / reply to this conversation on ReviewNB ErikRingen commented on 2026-04-08T09:50:50Z Line #22. fig.suptitle("None-Media Contributions", fontsize=18, fontweight="bold");
"Non-Media contributions" |
I think the simplest resolution
Actually forget my suggestion about the alternative contribution def, I don't think that is a good way to define it either because it depends heavily on the scaling of predictors. |
Maybe the cleanest resolution is, for |
|
Thank you, @ErikRingen, for your feedback. I will take a look at it tomorrow 🙏 . |
Resolve conflicts after multidimensional -> mmm rename: - Keep deprecation shim in multidimensional.py; merge branch MMM changes into mmm.py - Merge test_multidimensional additions into test_mmm.py; remove old test file - Fix imports (mmm_wrapper docstring, test_link, mmm_multiplicative notebook) - Defer decomposition imports in MMMIDataWrapper to break circular import Co-authored-by: Cursor <cursoragent@cursor.com>
|
@juanitorduz this feature is awesome! 🙌🏻 I've heard a few times from folks how they can build a log or lo-log model within our framework. Really like the I think the biggest concept users will need a thorough explanation is how we arrive at the different contributions under the hood. |
Experimental API for multiplicative MMMs.
📚 Documentation preview 📚: https://pymc-marketing--2477.org.readthedocs.build/en/2477/