INNER CODE UNIT · Python

beta_geometric_nbd_model_transactional_data

CamDavidsonPilon/lifetimes · lifetimes/generate_data.py:75

def beta_geometric_nbd_model_transactional_data(T, r, alpha, a, b, observation_period_end="2019-1-1", freq="D", size=1):
    """
    Generate artificial transactional data according to the BG/NBD model.

    See [1] for model details

    Parameters
    ----------
    T: int, float or array_like
        The length of time observing new customers.
    r, alpha, a, b: float
        Parameters in the model. See [1]_
    observation_period_end: date_like
        The date observation ends
    freq: string, optional
        Default 'D' for days, 'W' for weeks, 'h' for hours
    size: int, optional
        The number of customers to generate

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…