BetaGeoBetaBinomModel.distribution_new_customer_purchase_rate#

BetaGeoBetaBinomModel.distribution_new_customer_purchase_rate(data=None, *, random_seed=None)[source]#

Sample from the Beta distribution representing purchase probabilities for new customers.

This is the probability a new customer will make a purchase given they are still active.

Parameters:
dataDataFrame, optional

DataFrame containing the following columns:

  • customer_id: Unique customer identifier

If not provided, predictions will be ran with data used to fit model.

random_seedRandomState, optional

Random state to use for sampling.

Returns:
Dataset

Dataset containing the posterior samples for the population-level purchase rate.