Hacker News new | ask | show | jobs
by eadan 2310 days ago
I have experience implementing similar models for analyzing and predicting customer spending behavior. The posted paper may be somewhat abtruse for the uninitiated, so I thought I'd provide some background knowledge.

As the title states these are probability models for describing the purchasing behavior of customers. The paper outlines outlines several models depending on if customers may purchase at discrete times or continuously, and whether the customer relationship is contractual or not. As an example let's take the "BG/NBD" model for continuous time, non-contractual customer relations.

We assume each customer, `i`:

  1. Makes purchases according to an exponential distribution with mean rate `lambda[i]` [0].
  2. After a purchase becomes inactive (never makes a purchase again) with a fixed probability `p[i]`.
And, across all customers:

  3. The purchasing rate, `lambda[i]`, follows a Gamma distribution with parameters `alpha` and `beta` [1].
  4. The inactivity probability, `p[i]`, follows a Beta distribution with parameters `a` and `b` [2].
This is a generative model of the purchasing behavior of each customer. The goal is to find values of the parameters `lambda[i]`, `p[i]`, `alpha`, `beta`, `a` and `b` that "fit" your data the "best". Emphasis here because there different notions on what "best" means, but the two main approaches are optimization (typically maximizing the likelihood) and Bayesian approaches which rather than finding the "best" value for a parameter, find a distribution over all possible values called the posterior.

There are implementations of these models for python [3] and R [4].

[0] https://en.wikipedia.org/wiki/Exponential_distribution

[1] https://en.wikipedia.org/wiki/Gamma_distribution

[2] https://en.wikipedia.org/wiki/Beta_distribution

[3] https://github.com/CamDavidsonPilon/lifetimes

[4] https://github.com/cran/BTYD

1 comments

Thanks for the Github links. I would like to add https://github.com/mplatzer/BTYDplus