ParetoNBDModel.distribution_new_customer_recency_frequency#
- ParetoNBDModel.distribution_new_customer_recency_frequency(data=None, *, T=None, random_seed=None, n_samples=1000)[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
DataFrame
, optional DataFrame containing the following columns:
customer_id
: Unique customer identifierT
: Time between the first purchase and the end of the observation period.All covariate columns specified when model was initialized.
If not provided, the method will use the fit dataset.
- Tarray_like, optional
Number of observation periods for each customer. If not provided, T values from fit dataset will be used. Not required if
data
Dataframe contains aT
column.- random_seed
RandomState
, optional Random state to use for sampling.
- n_samples
int
, optional Number of samples to generate. Defaults to 1000.
- data
- Returns:
Dataset
Dataset containing the posterior samples for the customer population.