ParetoNBDModel.expected_probability_alive#

ParetoNBDModel.expected_probability_alive(data=None, *, future_t=None)[source]#

Compute expected probability of being alive.

Compute the probability that a customer with history frequency, recency, and T is currently active. Can also estimate alive probability for future_t periods into the future.

Adapted from equation (18) in Bruce Hardie’s notes [1].

Parameters:
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 the first purchase and the end of the observation period. Model assumptions require T >= recency

  • future_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 data Dataframe contains a future_t column.

References

[1]

Fader, Peter & G. S. Hardie, Bruce (2014). “Additional Results for the Pareto/NBD Model.” https://www.brucehardie.com/notes/015/additional_pareto_nbd_results.pdf