INNER CODE UNIT · Python

pareto_nbd_model

CamDavidsonPilon/lifetimes · lifetimes/generate_data.py:141

def pareto_nbd_model(T, r, alpha, s, beta, size=1):
    """
    Generate artificial data according to the Pareto/NBD model.

    See [2]_ for model details.

    Parameters
    ----------
    T: array_like
        The length of time observing new customers.
    r, alpha, s, beta: float
        Parameters in the model. See [1]_
    size: int, optional
        The number of customers to generate

    Returns
    -------
    :obj: DataFrame

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…