Description Usage Arguments Value
fit
fits a sBG model for CLV. It estimates the parameter alpha
, beta
, cp_alpha
and cp_beta
The model is evaluated by calculating the median and mean of the root mean-square error between the predicted and actual retention rate per cohort.
1 | fit(df_data, cp_period = 0)
|
df_data |
a data frame must contain the columns 'cohort', 'period' and 'survived_customers'. |
cp_period |
a number which denotes the period after which any change in the behaviour is happening. If it is equal to 0, no change is happening. Default is set as 0. Example: If period one shows a different behaviour as the other periods, cp_period is set as 1. |
list with the following components: 'params' a list with estimated parameter, 'df_data' the data frame used for fitting.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.