fbprophet使用

prophet是Facebook开源库,在Python和R中提供的预测工具,详细介绍见fbprophet, 想看中文版的在这prophet模型小结

github地址:https://github.com/facebook/prophet

1. 安装prophet之前首先安装pyStan

pip install pyStan

2.安装fbprophet

pip install fbprophet

出现如下报错:ERROR:fbprophet:Importing plotly failed. Interactive plots will not work.

 

参照 这篇博客https://www.jianshu.com/p/afe4e7c0a7eb安装  plotly模块

不知道为什么我电脑不能用conda安装。。。。还是用pip安装

pip install plotly

成功。。

3. 使用 fbprophet

报错提醒:fit()的输入数据必须包括"ds"和“y",ds是dates, y是值

df = df.rename(columns={"Month":"ds","#Passengers":"y"})

后面大概就没啥 问题,可以参考官方文档quit start

发布了69 篇原创文章 · 获赞 28 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/qq_24852439/article/details/103393725
今日推荐