BetaGeoModel.expected_probability_no_purchase#
- BetaGeoModel.expected_probability_no_purchase(t, data=None)[source]#
Compute the probability a customer with history frequency, recency, and T will have 0 purchases in the period (T, T+t].
The data parameter is only required for out-of-sample customers.
Adapted from Section 5.3, Equation 34 in Bruce Hardie’s notes [1].
- Parameters:
- data*pandas.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
- t
int Days after T which defines the range (T, T+t].
References
[1]Fader, P. S. & Hardie, B. G. (2019) “A Step-by-Step Derivation of the BG/NBD Model.” https://www.brucehardie.com/notes/039/bgnbd_derivation__2019-11-06.pdf