BetaGeoModel.expected_purchases#

BetaGeoModel.expected_purchases(data=None, *, future_t=None)[source]#

Compute the expected number of future purchases across future_t time periods given recency, frequency, and T for each customer.

The data parameter is only required for out-of-sample customers.

Adapted from equation (10) in [1], and the legacy lifetimes library: CamDavidsonPilon/lifetimes

Parameters:
future_tint, array_like

Number of time periods to predict expected purchases.

dataDataFrame

Optional dataframe containing the following columns:

  • customer_id: Unique customer identifier

  • frequency: Number of repeat purchases

  • recency: Time between the first and the last purchase

  • T: Time between first purchase and end of observation period; model assumptions require T >= recency

References

[1]

Fader, Peter S., Bruce G.S. Hardie, and Ka Lok Lee (2005a), “Counting Your Customers the Easy Way: An Alternative to the Pareto/NBD Model,” Marketing Science, 24 (2), 275-84. https://www.brucehardie.com/papers/bgnbd_2004-04-20.pdf