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

Intermediate CLV results need to be stored #1097

Open
haseeb1431 opened this issue Oct 21, 2024 · 1 comment
Open

Intermediate CLV results need to be stored #1097

haseeb1431 opened this issue Oct 21, 2024 · 1 comment
Labels
CLV enhancement New feature or request

Comments

@haseeb1431
Copy link

haseeb1431 commented Oct 21, 2024

          > Can we get the intermediate results output as well such as prediction at each month level so that we can reuse the data and avoid running predictions again and again. [I think it's not possible as per the code](https://github.com/pymc-labs/pymc-marketing/blob/aef97917e72f26f247cd6be83274f52895cdad4f/pymc_marketing/clv/utils.py#L134C2-L148C10) unless we update it to store the monthly values. Thoughts?

CLV is calculated progressively. Let's say if we want to calculate the CLV for 1, 3, 5, 7, and 10 years. Now I call the expected_customer_lifetime_value for each year (1,3,5,7,10 separately) and it starts calculating from month 0 every time. As we know CLV calculation is progressive so If I calculate the CLV for 10 years, internally we have calculated the CLV for all the years from the first year till year 10.

  • Year 1 CLV will calculate all the months from 1 to 12
  • Year 3 CLLV will calculate all the months from 1 to 36 (including the 12 months which we calculated last time)
  • Year 5 CLLV will calculate all the months from 1 to 60 (including the 36 months which we calculated last time)
  • Year 7 CLLV will calculate all the months from 1 to 84 (including the 60 months which we calculated last time)
  • Year 10 CLV will calculate all the months from 1 to 120 (including the 84 months which we calculated last time)

So there are a lot of calculations that are repeated. What I wanted is that if we calculate the CLV for 10th year, Can we get the intermediate results output as well such as prediction at each month level so that we can reuse the data and avoid running predictions again and again. I think it's not possible as per the code unless we update it to store the monthly values.

@wd60622 wd60622 added CLV enhancement New feature or request and removed Needs Triage labels Oct 21, 2024
@ColtAllen
Copy link
Collaborator

ColtAllen commented Oct 22, 2024

It's possible for purchase probabilities to be estimated across various time intervals:

However, this is not the case for expected purchases. Computationally there is no difference; just need to write the results for every iteration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLV enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants