开始使用免费开始使用

识别 II

您已经了解到,savings 时间序列在无需差分的情况下就是平稳的。基于这一信息,您现在可以尝试识别最合适的模型阶数。

plot_acf()plot_pacf() 函数已导入,时间序列已加载到 DataFrame savings 中。

本练习是课程的一部分

Python 中的 ARIMA 模型

查看课程

练习说明

  • 在坐标轴 ax1 上绘制 ACF 图,滞后为 1–10。
  • 同样绘制 PACF 图。

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Create figure
fig, (ax1, ax2) = plt.subplots(2,1, figsize=(12,8))
 
# Plot the ACF of savings on ax1
____

# Plot the PACF of savings on ax2
____

plt.show()
编辑并运行代码