生命周期内无法导入估算模块

时间:2019-05-28 05:20:08

标签: python-3.x compiler-errors lifetimes-python

我正在尝试分析客户购物数据,并使用Python中的有效期软件包进行了尝试。我无法在有效期内导入估算模块

from lifes.utils import * 从lifetimes.plotting导入*

from lifes.estimation import *

from lifetimes.estimation import *

ModuleNotFoundError:没有名为“ lifetimes.estimation”的模块

2 个答案:

答案 0 :(得分:0)

安装生命周期版本0.2.2.2

https://pypi.org/project/Lifetimes/0.2.2.2/

pip install Lifetimes==0.2.2.2

答案 1 :(得分:0)

在其他人遇到相同问题(由于遵循冗余代码)的情况下,应对此进行进一步扩展。

lifetimes.estimation模块在lifelifes包中不再可用(根据latest model documentation)。该模块中的所有功能已移至其他模块,您实际上不再需要此模块。继续使用最新的模型版本0.11.1,并且不要导入此特定子模块。