ARIMA模型时间序列预测
时间: 2023-09-16 08:11:53 浏览: 115
ZIP_danger1t1_turnazi_arima_python时间序列预测_ARIMA预测_
ARIMA模型是一种用来进行时间序列预测的统计模型,可以在Python中使用第三方包statsmodels.tsa.arima.model来实现。具体步骤如下:
1. 导入所需的库和模块:
```python
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from statsmodels.tsa.arima.model import ARIMA
```
2. 准备数据:
```python
# 读取数据
with h5py.File('./taxi.h5', 'r') as hf:
in_data = np.array(hf['in_data'])
in_area = in_data.transpose(2, 0, 1)
in_mean_day = in_area.mean(axis=2)
sub_data = pd.Series(in_mean_day
阅读全文