我正在探索python中时间序列的层次预测,并遇到了科学与技术库。我使用pip install scikit-hts安装了这个包。我遵循了这教程中提到的步骤。我创建了层次树并进入了建模部分。我想用Facebook预言家算法预测底层预测。我运行了以下代码
clf = hts.HTSRegressor(model='prophet', revision_method='AHP', n_jobs=0)
model = clf.fit(hierarchy_train, hierarchy)这发出了警告信息,
Fitting models: 0%| | 0/46 [00:00<?, ?it/s]prophet model requires fbprophet to
work. Exiting.Install it with: pip install scikit-hts[prophet]
Fitting models: 0%| | 0/46 [00:00<?, ?it/s]这条错误信息,
AttributeError: 'NoneType' object has no attribute 'fit'我尝试从这里安装每一个附加的软件包。但是它为每个包抛出了以下错误消息(这里只显示了arima模型)
zsh: no matches found: scikit-hts[arima]有人能解释一下为什么会这样吗?是因为软件包已经停止,还是在我的安装过程中出现了问题?
编辑:
pip install scikit-hts[x] ( x=all/geo/arima/prophet)没有工作。这段代码用于x= auto_arima、holt_winters、sarimax,但对于prophet没有运行--当我尝试prophet时,我得到了以下错误
AttributeError: 'NoneType' object has no attribute 'fit'为什么模型不运行于prophet
import hts发布于 2021-05-22 10:12:45
我刚试过用同样的参数。它运转正常,没有任何错误。也许他们已经在0.5.4的后期版本中解决了这个问题。升级软件包后,试着检查一次。如果你还没那么做的话。
发布于 2022-10-22 16:53:33
在木星中,您需要像这样转义括号来安装依赖项。
import sys
!{sys.executable} -m pip install scikit-hts\[prophet\]https://stackoverflow.com/questions/67096136
复制相似问题