下表是我的数据帧的一个示例.我正在使用终身套餐.
Organization id | Lifetime_orders | DOY(most recent date by day) | Tenure |
---|---|---|---|
54302 | 22 | 69 | 43 |
32453 | 4 | 72 | 44 |
这是我用来在LifeTimes包中运行bgModel的代码
from lifetimes.plotting import plot_period_transactions, plot_frequency_recency_matrix, plot_probability_alive_matrix, plot_history_alive
bgModel = BetaGeoFitter()
bgModel.fit(new_df['lifetime_orders'], df['tenure'], df['DOY'])
bgModel.summary
但是当我运行代码时,我得到一个ValueError:新近向量中的一些值大于T向量.
我预计会有一张显示系数和上下限的汇总表.我try 将数据类型更改为FLOAT、OBJECT和INT,但不起作用.我看了一下git https://github.com/CamDavidsonPilon/lifetimes/blob/master/lifetimes/utils.py的包装,但帮助不大.