pymc-labs / pymc-marketing

Bayesian marketing toolbox in PyMC. Media Mix (MMM), customer lifetime value (CLV), buy-till-you-die (BTYD) models and more.
https://www.pymc-marketing.io/
Apache License 2.0
648 stars 175 forks source link

Closed-Form PMFs for PPCs #878

Open ColtAllen opened 1 month ago

ColtAllen commented 1 month ago

While working on the upcoming BetaGeoBetaBinomModel, I found a closed-form solution in the research paper for the model's probability mass function (PMF). After doing some more digging I realized every CLV model has a closed-form expression.

Currently the distribution_new_customers method builds these PMFs from scratch via sampling. However, it should be more performant for PPCs (both prior and posterior) to use the closed-form PMF expressions.

ColtAllen commented 1 month ago

@ricardoV94 this sampling convention began with ShiftedBeteGeoModelIndividual. Is there a reason why the PMF in the paper wasn't used? See equation(3):

https://faculty.wharton.upenn.edu/wp-content/uploads/2012/04/Fader_hardie_jim_07.pdf

ricardoV94 commented 1 month ago

@ricardoV94 this sampling convention began with ShiftedBeteGeoModelIndividual. Is there a reason why the PMF in the paper wasn't used? See equation(3):

https://faculty.wharton.upenn.edu/wp-content/uploads/2012/04/Fader_hardie_jim_07.pdf

Sampling from a PMF is not trivial? I'm not sure what you're suggesting