【发布时间】:2020-10-10 18:22:16
【问题描述】:
我有以下数据集test_1
Date Frequency
0 2020-01-20 10
1 2020-01-21 2
2 2020-01-22 1
3 2020-01-23 10
4 2020-01-24 6
... ... ...
74 2020-04-04 7
75 2020-04-05 9
76 2020-04-06 8
77 2020-04-07 6
78 2020-04-08 1
其中Frequency 是按日期计算的用户频率列。
我想预测未来趋势,为此我正在考虑使用 ARIMA 模型。 我用过这段代码
# fit model
model = ARIMA(test_1, order=(5,1,0))
model_fit = model.fit(disp=0)
print(model_fit.summary())
# plot residual errors
residuals = DataFrame(model_fit.resid)
residuals.plot()
pyplot.show()
residuals.plot(kind='kde')
pyplot.show()
print(residuals.describe())
但我收到此错误:ValueError: Pandas data cast to numpy dtype of object. Check input data with np.asarray(data).
由于model = ARIMA(test_1, order=(5,1,0))。
你知道这意味着什么以及我该如何解决它吗?
【问题讨论】:
标签: python pandas time-series arima