Skip to content
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

distribution_new_customer Enhancements #1035

Closed
ColtAllen opened this issue Sep 13, 2024 · 1 comment
Closed

distribution_new_customer Enhancements #1035

ColtAllen opened this issue Sep 13, 2024 · 1 comment
Labels

Comments

@ColtAllen
Copy link
Collaborator

The _distribution_new_customer internal method was originally written for sampling from the latent purchase and dropout distributions of CLV models. It is even more useful for posterior predictive checks, but is taking 1000 samples for each customer in the dataset, which is quite wasteful.

This can be fixed by simply adding an n_samples parameter to _distribution_new_customer, and a default argument of 1 to the distribution_new_customer_recency_frequency external method. On that note, _distribution_new_customer is unique to each model, but the external methods that call it can probably be moved into CLVBaseModel.

@Ishaanjolly
Copy link
Contributor

Hi @ColtAllen - I just made an attempt on this. Understand the it's low priority but it was easy enough to do this quickly. Have a look at my PR #1061

juanitorduz added a commit that referenced this issue Sep 23, 2024
* feat: test.txt added for commit check

* feat: replaced plot_curve with plot_samples within ./mmm/plot.py

* feat: n_samples added to distributions_new_customers

* revert the plot.py changes

---------

Co-authored-by: Juan Orduz <[email protected]>
jsnyde0 pushed a commit to jsnyde0/pymc-marketing that referenced this issue Sep 24, 2024
* feat: test.txt added for commit check

* feat: replaced plot_curve with plot_samples within ./mmm/plot.py

* feat: n_samples added to distributions_new_customers

* revert the plot.py changes

---------

Co-authored-by: Juan Orduz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants