我的代码是关于预测时间序列数据的
pred_uc = model_fit.forecast(steps=50)
# Get confidence intervals of forecasts
#pred_ci = pred_uc.conf_int()
我试图在Python上使用ARIMA可视化预测的数据,下面是我的代码
ax = df['spei'].plot(label='observed', figsize=(20, 15))
pred_uc.predicted_mean.plot(ax=ax, label='Forecast')
#ax.fill_between(pred_ci.index,
# pred_ci.iloc[:, 0],
# pred_ci.iloc[:, 1], color='k', alpha=.25)
ax.set_xlabel('Date')
ax.set_ylabel('spei')
plt.legend()
plt.show()
我犯了这个错误
AttributeError: 'tuple' object has no attribute 'predicted_mean'
请帮帮我
目前没有回答
相关问题 更多 >
编程相关推荐