ParetoNBDModel.expected_purchases_new_customer#

ParetoNBDModel.expected_purchases_new_customer(data=None, *, t=None)[source]#

Expected number of purchases for a new customer across t time periods.

In a model with covariates, if data is not specified, the dataset used for fitting will be used. A prediction will be computed for a new customer with each set of covariates. This is not a conditional prediction on the observed customers!

Adapted from equation (27) in Bruce Hardie’s notes [2], and lifetimes package: CamDavidsonPilon/lifetimes

Parameters:
  • data (pd.DataFrame, optional) –

    Dataframe containing the following columns:
    • customer_id: unique customer identifier

    • t: Number of time periods to predict expected purchases.

    • 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 time periods over which to estimate purchases. Not needed if data parameter is provided with a t column.

Return type:

DataArray

References