BetaGeoBetaBinomModel.distribution_new_customer_recency_frequency#

BetaGeoBetaBinomModel.distribution_new_customer_recency_frequency(data=None, *, T=None, random_seed=None, n_samples=1)[source]#

BG/BB process representing purchases across the customer population.

This is the distribution of purchase frequencies given ‘T’ observation periods for each customer.

Parameters:
dataDataFrame, optional

DataFrame containing the following columns:

  • customer_id: Unique customer identifier

  • T: Total purchase opportunities.

If not provided, the method will use the fit dataset.

Tarray_like, optional

Total purchase opportunities. If not provided, T values from fit dataset will be used. Not required if data Dataframe contains a T column.

random_seedRandomState, optional

Random state to use for sampling.

n_samplesint, optional

Number of samples to generate. Defaults to 1.

Returns:
Dataset

Dataset containing the posterior samples for the customer population.