ParetoNBDModel.distribution_new_customer_purchase_rate#
- ParetoNBDModel.distribution_new_customer_purchase_rate(data=None, *, random_seed=None)[source]#
Sample from the Gamma distribution representing purchase rates for new customers.
This is the purchase rate for a new customer and determines the time between purchases for any new customer.
- Parameters:
data (pd.DataFrame, optional) –
- DataFrame containing the following columns:
customer_id
: unique customer identifiercovariates: Purchase and dropout covariate columns if original model had any.
If not provided, the method will use the fit dataset.
random_seed (RandomState, optional) – Random state to use for sampling.
- Returns:
Dataset containing the posterior samples for the population-level purchase rate.
- Return type:
xr.Dataset