INNER CODE UNIT · Python
modified_beta_geometric_nbd_model
CamDavidsonPilon/lifetimes · lifetimes/generate_data.py:205
def modified_beta_geometric_nbd_model(T, r, alpha, a, b, size=1):
"""
Generate artificial data according to the MBG/NBD model.
See [3]_, [4]_ 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