ParetoNBDModel.distribution_new_customer_recency_frequency#
- ParetoNBDModel.distribution_new_customer_recency_frequency(data=None, *, T=None, random_seed=None)[source]#
Pareto/NBD process representing purchases across the customer population.
This is the distribution of purchase frequencies given ‘T’ observation periods for each customer.
- Parameters:
data (pd.DataFrame, optional) –
- DataFrame containing the following columns:
customer_id
: unique customer identifierT
: time between the first purchase and the end of the observation period.covariates: Purchase and dropout covariate columns if original model had any.
If not provided, the method will use the fit dataset.
T (array_like, optional) – Number of observation periods for each customer. If not provided, T values from fit dataset will be used. Not needed if
data
parameter is provided with aT
column.random_seed (RandomState, optional) – Random state to use for sampling.
- Returns:
Dataset containing the posterior samples for the customer population.
- Return type:
xr.Dataset