Closed alistairallan closed 3 months ago
@alistairallan Do you have issues with all datasets or only with yours? Does the plot look correct with CDNOW data?
I was able to get the CDNOW data to work see: https://colab.research.google.com/drive/1oc8vbnG-kHc_xaSZStNBH3e1R_VFboqb
But I wasn't able to get https://github.com/susanli2016/Machine-Learning-with-Python/blob/master/CLV_Online_Retail.ipynb to work. Please see: https://colab.research.google.com/drive/15Ab4lbeai0TnVcaWOKF2ObpEtQVNnhuQ
In the original github, it looked like this:
The changes I made to the notebook were as follows: I downgraded scipy from 1.2.0 to 1.1.0 because of: https://github.com/CamDavidsonPilon/lifetimes/issues/274
I commented out from lifetimes.estimation import *
because it doesn't seem to exist anymore
Thanks! Teresa
I have the same issue, were you able to fix it?
I have the same issue, any solution?
I have the same issue as well.
My fault was, that I did not check the actual p_alive value in the plot for that specific userID/customerID. It was a path full of 1 and hide on the top in the graph.
I entered a little print statement in the lifetimes.plotting.plot_history_alive to check the values on the path coming back from the function.
# plot alive_path
path = calculate_alive_path(model, transactions, datetime_col, t, freq)
print(path.head())
path_dates = pd.date_range(start=min(transactions[datetime_col]), periods=len(path), freq=freq)
Et voila, they were just ones. So if you got no p_alive path in your plot, check the actual path values for that line. This could be the issue. :-)
I'm having the same issue and following @FakieKickflip I discovered I have all ones. Do you know which can cause this? I have a dataframe in which all customers gets P_alive=1 for long time, I think is not possible...
This is what happens if I set t=10000
@fpannacci hard to figure out what is going on. In your plot the customer bought last in around 2014, 2015. It can not be right that he is an alive customer in 2021 and beyond.
Yes right...the data comes from here [https://www.kaggle.com/apoorvaappz/global-super-store-dataset] and the customer ID I'm looking at is NZ-18565
I'm running the following code in a local Jupyter Notebook. https://github.com/susanli2016/Machine-Learning-with-Python/blob/master/CLV_Online_Retail.ipynb I had an issue with
Matplotlib
after installing Lifetimes and had to reinstall via Conda.The code all runs as expected, predict works etc and all the plots run correctly except for
plot_history_alive
which only plots thepurchases
, but notP_alive
.I get no errors or warnings.
I can run predict on different period lengths for different customers and it runs fine, so might be related to the libraries? I had a quick look at the
plot_history_alive
function but I couldn't see any reason why it shouldn't work.I'm using:
Any ideas on where I should look first to debug?
Thanks A