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
717 stars 201 forks source link

Closed-Form PMFs for PPCs #878

Open ColtAllen opened 4 months ago

ColtAllen commented 4 months 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 4 months 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 4 months 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