Skip to content

Commit

Permalink
Make data optional in all ParetoNBD methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoV94 committed Mar 15, 2024
1 parent d9c19c4 commit 72238c5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pymc_marketing/clv/models/pareto_nbd.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,6 @@ def distribution_new_customer_dropout(
data: pd.DataFrame, optional
DataFrame containing the following columns:
* `customer_id`: unique customer identifier
* `T`: time between the first purchase and the end of the observation period.
* covariates: Purchase and dropout covariate columns if original model had any.
If not provided, the method will use the fit dataset.
random_seed: RandomState, optional
Expand All @@ -934,7 +933,7 @@ def distribution_new_customer_dropout(

def distribution_new_customer_purchase_rate(
self,
data,
data: Optional[pd.DataFrame] = None,
*,
random_seed: Optional[RandomState] = None,
) -> xarray.Dataset:
Expand All @@ -945,6 +944,11 @@ def distribution_new_customer_purchase_rate(
Parameters
----------
data: pd.DataFrame, optional
DataFrame containing the following columns:
* `customer_id`: unique customer identifier
* covariates: Purchase and dropout covariate columns if original model had any.
If not provided, the method will use the fit dataset.
random_seed : RandomState, optional
Random state to use for sampling.
Expand All @@ -961,7 +965,7 @@ def distribution_new_customer_purchase_rate(

def distribution_new_customer_recency_frequency(
self,
data,
data: Optional[pd.DataFrame] = None,
*,
T: Optional[Union[int, np.ndarray, pd.Series]] = None,
random_seed: Optional[RandomState] = None,
Expand Down

0 comments on commit 72238c5

Please sign in to comment.