ParetoNBDModel.expected_purchases#
- ParetoNBDModel.expected_purchases(data=None, *, future_t=None)[source]#
Compute expected number of future purchases.
Given recency, frequency, and T for an individual customer, this method predicts the expected number of future purchases across future_t time periods.
Adapted from equation (41) In Bruce Hardie’s notes [1], and
lifetimespackage: CamDavidsonPilon/lifetimes- Parameters:
- 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 the first purchase and the end of the observation period. Model assumptions require T >= recencyfuture_t: Optional column for future_t parametrization.All covariate columns specified when model was initialized.
If not provided, predictions will be ran with data used to fit model.
- future_tarray_like
Number of time periods to predict expected purchases. Not required if
dataDataframe contains a future_t column.
- data
References
[1]Fader, Peter & G. S. Hardie, Bruce (2005). “A Note on Deriving the Pareto/NBD Model and Related Expressions.” http://brucehardie.com/notes/009/pareto_nbd_derivations_2005-11-05.pdf