我正在尝试使用Streamlight进行可视化。我的内容之一是预测如下图形: 使用jupyter笔记本中的此代码
pred_uc = results.get_forecast(steps=100)
pred_ci = pred_uc.conf_int()
ax = y.plot(label='observed', figsize=(14, 7))
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('Month')
ax.set_ylabel('Harga USD')
plt.legend()
plt.show()
但是当我尝试使用streamlight时,我会像这样稍微修改代码
pred_uc = results.get_forecast(steps=100)
pred_ci = pred_uc.conf_int()
ax = y.plot(label='observed', figsize=(14, 7))
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)
forecast = pred_uc.predicted_mean
st.write(forecast)
st.line_chart(forecast)
请给我一个解决方案!先谢谢你
目前没有回答
相关问题 更多 >
编程相关推荐