pymc-marketing icon indicating copy to clipboard operation
pymc-marketing copied to clipboard

Investigate CLV model composition

Open ricardoV94 opened this issue 1 year ago • 2 comments

with pm.Model() as m:
  hyper_priors = ...
  prior1, prior2 = distribution(hyper_priors)
  cohort1 = clv.ShiftedBetaGeo(data_cohort1, prior1)
  cohort2 = clv.ShiftedBetaGeo(data_cohort2, prior2)

clv.ComposeModel(...)

ricardoV94 avatar May 03 '23 13:05 ricardoV94

Is this for hierarchical priors, or something more general?

ColtAllen avatar Jul 07 '23 17:07 ColtAllen

Looking back on this, I can confirm BetaGeoModel benefits from hyperpriors. The a and b parameters of the Beta dropout distribution seem to benefit from a hierarchical pooling approach:

https://mc-stan.org/users/documentation/case-studies/pool-binary-trials.html

Back when I was still maintaining the btyd library, this was the only way I could get the posterior mean values to mach the MLE estimates from lifetimes:

# Beta parameters.
a = pm.Deterministic("a", uniform_prior * pareto_prior)
b = pm.Deterministic("b", (1.0 - uniform_prior) * pareto_prior)

ColtAllen avatar Apr 15 '24 09:04 ColtAllen