CamDavidsonPilon / lifetimes

Lifetime value in Python
MIT License
1.45k stars 374 forks source link

Negative Values in CLV #370

Closed martingg92 closed 3 months ago

martingg92 commented 4 years ago

I know tah this problem has been aborded a lot, but i dont find answears to have a solution with my data. Now im working with E-Commerce Data, specifically in non food (electronics), so the data is very skew, the 80% of my clients have bought just one time. Also, with the coronavirus have appear a lot of new customers.

In the fit of Gamma Gamma model im using different penalizer_coef, to avoid negative values in CLV, but i have use a lot of diferent values (between 9.0 to 0.00000000000000000009) and always appers negative values. Also i have the the q parameter and with the penalizer_coef under 0.000000009 the maximum value is 0.79. So i used the q_constraint in the fit, but it return 90% with nans, also with custumers with "good behavior" it returns nan.

In sintesis, the CLV return too much negative values and with the q_constraint returns too much nans and -inf.

attached my data, graphs with a describe

image

image

Thanks!!

psygo commented 4 years ago

Please, do not paste images for code and/or error messages. Paste them as code blocks here, otherwise it's gonna be difficult to find help.

You could also share a sample of your data here — make sure it shows the same patterns you're facing with the whole dataset.