其他分享
首页 > 其他分享> > 在RNN / LSTM中处理丢失的数据(时间序列)

在RNN / LSTM中处理丢失的数据(时间序列)

作者:互联网

如标题所示,我有一个时间序列数据集,并且有很多丢失的数据.对于LSTM模型,处理此问题的最佳方法是什么?

为了提供更多详细信息,我大约有五个数据源来创建数据集,其中一些不允许我获取历史数据,因此我在该数据源中缺少很多功能.我可以使用最近观察到的样本进行填充,但是在大多数情况下这是不可能的.

我看到的一些建议是:

>隐马尔可夫建模
>期望最大化
>使用神经网络预测缺失值

但是对于所有我来说,我感觉我将失去很多数据完整性.通常如何处理/在LSTM模型中对此进行调整的最佳方法是什么?

我正在使用Python / Keras / TensorFlow.

解决方法:

也许模型顶层的masking会有所帮助.

For each timestep in the input tensor (dimension #1 in the tensor), if all values in the input tensor at that timestep are equal to mask_value, then the timestep will be masked (skipped) in all downstream layers (as long as they support masking).

标签:keras,machine-learning,neural-network,lstm,python
来源: https://codeday.me/bug/20191111/2019808.html