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
lifetimeslibrary: CamDavidsonPilon/lifetimes- Parameters:
- future_t
int, array_like Number of time periods to predict expected purchases.
- data
DataFrame Optional dataframe containing the following columns:
customer_id: Unique customer identifierfrequency: Number of repeat purchasesrecency: Time between the first and the last purchaseT: Time between first purchase and end of observation period; model assumptions require T >= recency
- future_t
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