ParetoNBDModel.expected_purchases_new_customer#
- ParetoNBDModel.expected_purchases_new_customer(data=None, *, t=None)[source]#
Compute the 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 and a prediction will be computed for a new customer with each set of covariates. This is not a conditional prediction for observed customers!Adapted from equation (27) in Bruce Hardie’s notes [1], and
lifetimes
package: CamDavidsonPilon/lifetimes- Parameters:
- data
DataFrame
, optional Dataframe containing the following columns:
customer_id
: unique customer identifiert
: Optional column for t parametrization.All covariate columns specified when model was initialized.
If not provided, predictions will be ran with data used to fit model.
- tarray_like, optional
Number of time periods over which to estimate purchases. Not required if
data
Dataframe contains a t column.
- data
References
[1]Fader, Peter & G. S. Hardie, Bruce (2005). “A Note on Deriving the Pareto/NBD Model and Related Expressions.” http://brucehardie.com/notes/009/pareto_nbd_derivations_2005-11-05.pdf