I'm trying to calculate CLV(Customer Life Value) using lifetimes
python library
so, I am fitting purchase behavior data on ParetoNBDFitter
and fitting purchase price data on GammaGammaFitter
.
and When I'm trying to calculate CLV based on GammaGammaFitter.customer_lifetime_value()
, there are same errors about
NotImplementedError: Cannot apply ufunc <ufunc 'hyp2f1'> to mixed DataFrame and Series inputs.
Interestingly, I could calculate the CLV yesterday successfully, but today the above error is coming out. The code and data have not been modified.
My code looped by date, each time I redefined the model and then calculated the CLV.