-
Notifications
You must be signed in to change notification settings - Fork 192
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
Fix parameterization in _distribution_new_customers
#430
Conversation
_distribution_new_customers
Codecov Report
@@ Coverage Diff @@
## main #430 +/- ##
=======================================
Coverage 90.83% 90.83%
=======================================
Files 21 21
Lines 1920 1920
=======================================
Hits 1744 1744
Misses 176 176
|
Frequency/recency would make for a better emperical comparison, as recency denotes the time period of the customer's last purchase. However, I've been thinking of this in the reciprocal (recency/frequency) which would be the average number of days between purchases. The best way to test this in practice (if not for this PR) would be to do a posterior predictive check with these purchase and dropout rate distributions as parametrized: However, PPCs aren't supported in |
Thinking more on this, I've realized you're right - this model is a poisson process for frequency over time, and flipping the rate parameter won't yield time per frequency. The parameter can remain as previously defined; no need for changes. I do think time between purchases is more interpretable to the user though, so I'll make a note to take the reciprocal of this function's output for plotting in a future PR. One last nit-pick - the tests in beta geo use arbitrary parameters rather than generating them from a test dataset, and |
All good. I was wrapping my head around it too. Between reusing greek letters and gamma parameterizations, its hard to keep it straight. |
Might be good for a new issue? |
Address #328
Wondering why there is discrepancy in the generative process in the top of the test class and what is required here. Also, this test doesn't confirm the validity
TODO:
📚 Documentation preview 📚: https://pymc-marketing--430.org.readthedocs.build/en/430/