【发布时间】:2020-02-25 16:59:35
【问题描述】:
今天,我的 colab 脚本开始出现问题,该脚本使用 facebook 先知。
我尝试在基本脚本上重现该错误。
问题出在:
m.fit(df)
在这里你可以找到错误:
KeyError Traceback (most recent call last)<br>
KeyError: 'metric_file'<br>
and the session crashed.<br>
<br>
在这里你可以找到完整的代码:
Python
import pandas as pd
from fbprophet import Prophet
df=pd.read_csv('https://raw.githubusercontent.com/facebook/prophet/master/examples/example_wp_log_peyton_manning.csv')
df.head()
m = Prophet()
m.fit(df)
forecast = m.predict(future)
forecast[['ds', 'yhat', 'yhat_lower', 'yhat_upper']].tail()
fig1 = m.plot(forecast)
谢谢,F.
【问题讨论】:
标签: python google-colaboratory facebook-prophet