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

Allow covariates in plot_expected_purchases #1430

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

PabloRoque
Copy link
Contributor

@PabloRoque PabloRoque commented Jan 24, 2025

Description

Includes covariates when calculation the unconditional frequency expectation. Allows the estimation of future purchases for the "average customer" just after first order for models with covariates.

Additionally:

  • Introduces a new dataset apparel_trans.csv and accompanying apparel_static_cov.csv. These datasets are extracted from R's CLVTools package.
  • A new notebook bg_nbd_covariates.ipynb shows an example of the new functionality using the new dataset.

Related Issue

Checklist


📚 Documentation preview 📚: https://pymc-marketing--1430.org.readthedocs.build/en/1430/

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot added docs Improvements or additions to documentation CLV tests labels Jan 24, 2025
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 16.12903% with 78 lines in your changes missing coverage. Please review.

Project coverage is 56.03%. Comparing base (cf3eab2) to head (d31d8d3).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pymc_marketing/clv/models/beta_geo.py 21.12% 56 Missing ⚠️
pymc_marketing/clv/utils.py 0.00% 22 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (cf3eab2) and HEAD (d31d8d3). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (cf3eab2) HEAD (d31d8d3)
11 7
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1430       +/-   ##
===========================================
- Coverage   92.58%   56.03%   -36.56%     
===========================================
  Files          52       52               
  Lines        6043     6109       +66     
===========================================
- Hits         5595     3423     -2172     
- Misses        448     2686     +2238     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ColtAllen
Copy link
Collaborator

I'll review this in detail later, but it looks like there may be merge conflicts with #1390

@PabloRoque PabloRoque requested a review from ColtAllen February 11, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLV docs Improvements or additions to documentation tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants