ParetoNBDModel.expected_probability_alive#
- ParetoNBDModel.expected_probability_alive(data=None, *, future_t=None)[source]#
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 [3].
- Parameters:
data (pd.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 >= recency
future_t
: Number of time periods in the future to estimate alive probability; defaults to 0.covariates: Purchase and dropout covariate columns if original model had any.
If not provided, the method will use the fit dataset.
future_t (array_like, optional) – Number of time periods in the future to estimate alive probability; defaults to 0. Not needed if
data
parameter is provided with afuture_t
column.
- Return type:
DataArray
References