-
Notifications
You must be signed in to change notification settings - Fork 247
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 static covariates in BGNBDModel #1390
Conversation
…taGeoModel. Add some tests
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1390 +/- ##
==========================================
+ Coverage 92.59% 92.65% +0.06%
==========================================
Files 52 52
Lines 6051 6103 +52
==========================================
+ Hits 5603 5655 +52
Misses 448 448 ☔ View full report in Codecov by Sentry. |
Merging #1375 has created a merge conflict in |
The |
…thCovariates.test_extract_predictive_covariates
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
OK, the plot kind of thickened.
I added
This was the whole thing!. I was not taking into account the properties of the Beta dist, and following the ParetoNBD implementation blindly. Working on the notebook, I thought I was going crazy. E["dropout"]~0.5 always, regardless of the covariates I was using. Note that in the test setup we have equal coefficients: Note however some findings. We are using |
hey! are we missing something here? any blockers :) ? |
Just haven't found time to look at it yet 🤔 Reviewing now. |
It is good to ship on my side, and would allow to work on a clean branch on the addition of covariates to the @ColtAllen requested changes a couple of weeks ago related to some tests. I believe I've addressed all the worries he expressed (see dev notebook), but would be good to have the green light on his side. |
|
|
||
def test_expectation_method(self): | ||
"""Test that predictive methods work with covariates""" | ||
# Higher covariates with positive coefficients -> higher change of death and vice-versa |
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.
Do your experiments in the dev notebook confirm this? This seems copy/pasted from the equivalent test for ParetoNBD model.
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.
Modified accordingly to the findings in the notebook
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.
Code looks good! Just some clarifying questions regarding notebook experiments and request to add an additional test condition, and I think this will be good to merge!
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.
Great job! Let's continue to test prior configs w/ covariates and update the docs with our findings.
Thank you @PabloRoque and @ColtAllen 🙌😎🚀 |
Description
Allows static covariates in
BetaGeoModel
NOTE: It seems there are convergence issues with the dropout-covariates-related paramsa|b
. Related to similar observations by @juanitorduz here. As a consequence the last two assertions intest_distribution_method
are a dubious hack.Related Issue
Checklist
Modules affected
Type of change
📚 Documentation preview 📚: https://pymc-marketing--1390.org.readthedocs.build/en/1390/