-
Notifications
You must be signed in to change notification settings - Fork 220
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
Modified Beta Geometric model #1301
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1301 +/- ##
==========================================
+ Coverage 95.03% 95.13% +0.10%
==========================================
Files 43 44 +1
Lines 4530 4629 +99
==========================================
+ Hits 4305 4404 +99
Misses 225 225 ☔ View full report in Codecov by Sentry. |
), | ||
) | ||
|
||
def expected_num_purchases( |
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 we need this method just to deprecate?
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.
No, this should be deleted.
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.
If this is to be deleted, then we should as well delete the associated BetaGeoModel.expected_num_purchases
.
Notice that we are inheriting, and a user may by mistake call the method.
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.
Best to do this in a separate PR prior to merging this one. I don't think it should be added to the release notes because it's not deprecation in the truest sense of the term, but rather renaming a method.
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.
Thanks for opening this PR @PabloRoque! Can you also add a dev notebook for this model to docs/source/notebooks/clv/dev
? Nothing fancy - just need to visually inspect model.idata
and some fit diagnostics. You can use the first 21 cells in the BetaGeoNBD Notebook as a template.
), | ||
) | ||
|
||
def expected_num_purchases( |
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.
No, this should be deleted.
Thanks for the quick review. Let me address your suggestions during the day. |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Added. The watermark states: This is a bit ahead of the current |
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.
expected_probability_no_purchase
is being inherited from BetaGeoModel
. It was derived by @DylanZammit and does not appear in research:
[https://github.com//issues/1093]
We should override that method in this model with a Exception message that it is unsupported and delete the corresponding notebook section until we can verify the math derivations. Please feel free to create a separate issue for the derivations.
…y_no_purchase. Remove part in notebook
Added |
Let's remove the corresponding tests as well and add one that catches the |
Added Weibull prior section View entire conversation on ReviewNB |
Added raise NotImplementedError on this method View entire conversation on ReviewNB |
…iated tests. Add raise NotImplementedError test
Done |
Let's leave it as-is for now and we can remove |
Nice work so far! It'd be a lot easier to review the docstrings if the readthedocs preview was working properly, but lately that CI job has been crashing: #1286 |
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.
We'll also need to add the notebook to./docs/source/notebooks/index.md so that it shows up in the docs, and add links to the README, Index, and top of the CLV Quickstart. Again, all stuff that's easier to check if the CI task is fixed.
Let's remove the Weibull comparisons; thanks for checking them. View entire conversation on ReviewNB |
View / edit / reply to this conversation on ReviewNB ColtAllen commented on 2024-12-21T11:33:08Z Clear the outputs from this cell. |
View / edit / reply to this conversation on ReviewNB ColtAllen commented on 2024-12-21T11:33:09Z Thanks for running this experiment. Looks like PabloRoque commented on 2024-12-23T08:40:19Z Deleted |
View / edit / reply to this conversation on ReviewNB ColtAllen commented on 2024-12-21T11:33:09Z This comment will need to be updated for PabloRoque commented on 2024-12-23T08:40:52Z Do you have a suggestion for this comment? ColtAllen commented on 2024-12-24T14:01:00Z Just remove it for now |
Deleted View entire conversation on ReviewNB |
Do you have a suggestion for this comment? View entire conversation on ReviewNB |
Just remove it for now View entire conversation on ReviewNB |
Thanks for adding this @PabloRoque! I'll review the pre-release docs and make some minor edits in charts, docstrings, etc. before the next release. |
Nice Xmas gift! Thanks for all the feedback and the time you took to dig into the details |
Description
Add Modified beta geometric model.
Credit to @ColtAllen and @CamDavidsonPilon, this is basically a copy and paste of their methods
Related Issue
Checklist
Modules affected
Type of change
📚 Documentation preview 📚: https://pymc-marketing--1301.org.readthedocs.build/en/1301/