Closed littlesweet1129 closed 2 years ago
Hey @littlesweet1129,
Passing in Panda series as arguments can lead to unstable behavior because many of the internal methods in the legacy fitters
module expect numpy arrays. Try making the following changes to your code:
clv = ggf.customer_lifetime_value(
transaction_prediction_model = bgf,
frequency = df_rftv["frequency"].values,
recency = df_rftv["recency"].values,
T = df_rftv["T"].values,
monetary_value = df_rftv["monetary_value"].values,
time = LIFE,
freq = "D",
discount_rate = discount_m)
It's a good practice to always use the df['column'].values
convention with all of the legacy Fitter
models. The Model
module I'm currently building as a replacement will not have this issue because the entire dataframe is provided as an argument instead of the separate array components.
Hi there, I successfully fitted a modified beta geo model as well as a gamma gamma model. However, when I use the
customer_lifetime_value
function from the gg model, all CLV are NaN.