【发布时间】:2019-05-18 23:57:36
【问题描述】:
我正在尝试使用 LSTM 方法解决 Python 中多变量数据的时间序列预测问题。
在here,作者解决时间序列空气污染预测问题。数据如下所示:
pollution dew temp press wnd_dir wnd_spd snow rain
date
2010-01-02 00:00:00 129.0 -16 -4.0 1020.0 SE 1.79 0 0
2010-01-02 01:00:00 148.0 -15 -4.0 1020.0 SE 2.68 0 0
2010-01-02 02:00:00 159.0 -11 -5.0 1021.0 SE 3.57 0 0
2010-01-02 03:00:00 181.0 -7 -5.0 1022.0 SE 5.36 1 0
2010-01-02 04:00:00 138.0 -7 -5.0 1022.0 SE 6.25 2 0
与上述教程中的每年相比,我对足球比赛进行了 30 秒的时间步长观察,其中包含 20 多个特征。其中每个具有唯一 ID 的匹配具有不同的长度,范围从 190 到 200。
作者按一年中的天数拆分训练/测试集如下:
# split into train and test sets
values = reframed.values
n_train_hours = 365 * 24
train = values[:n_train_hours, :]
test = values[n_train_hours:, :]
所以我的训练/测试集应该是匹配的数量: (匹配*len(匹配))
n_train_matches = some k number of matches * len(match)
train = values[:n_train_matches, :]
test = values[n_train_matches:, :]
我想将其转化为我的问题,以便最早在时间 t=2 时对每个特征进行预测。 IE。 30 秒进入比赛。
问题
我是否需要在每场比赛中应用 pre-Sequence Padding?
有没有办法解决这个问题而不用填充?
【问题讨论】:
标签: keras sequence padding lstm recurrent-neural-network