INNER CODE UNIT · Python
beta_geometric_nbd_model
CamDavidsonPilon/lifetimes · lifetimes/generate_data.py:10
def beta_geometric_nbd_model(T, r, alpha, a, b, size=1):
"""
Generate artificial data according to the BG/NBD model.
See [1] for model details
Parameters
----------
T: array_like
The length of time observing new customers.
r, alpha, a, b: float
Parameters in the model. See [1]_
size: int, optional
The number of customers to generate
Returns
-------
DataFrame