如何在预测中结合静态特征和时间序列 [英] How to combine static features with time series in forecasting

查看:99
本文介绍了如何在预测中结合静态特征和时间序列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到一个类似的问题及其答案,但没有成功.这就是为什么我要问一个以前可能会问到的问题:

I tried to find a similar question and its answers but was not successful in doing so. That's why I'm asking a question that might be asked before:

我正在解决一个问题,该问题输出几口水井的累积产水量.我拥有的特征是时间序列(水量和泵速作为时间的函数)和静态(井深、井的经纬度、含水层厚度等)

I'm working on a problem that outputs the cumulative water production of several water wells. The features I have are both time series (water rate and pump speed as functions of time) and static (depth of the wells, latitude and longitude of the well, thickness of the water bearing zone, etc.)

对于井#1,我的输入数据可以如下所示.

My input data can be shown as below for well#1.

动态数据:

                water rate   pump speed   total produced water
2000-01-01         10            4                 1120
2000-01-02         20            8                 1140
2000-01-03         10            4                 1150
2000-01-04         10            3                 1160
2000-01-05         10            4                 1170

静态数据:

depth of the well_1 = 100
latitude and longitude of the well_1 = x1, y1
thickness of the water bearing zone of well_1 = 3

我的问题是如何构建一个可以同时采用动态和静态特征的 RNN 模型(LSTM、GRU...)?

My question is how a RNN model (LSTM, GRU, ...) can be built that can take both dynamic and static features?

推荐答案

有多种选择,您需要试验哪一种最适合您的情况.

There are multiple options, and you need to experiment which one will be optimal for your case.

选项 1:您可以将静态特征视为固定时态数据.因此,您为每个静态特征创建一个时间维度,让 LSTM 处理其余的.

Option 1: You can treat your static features as fixed temporal data. So, you make a temporal dimension for each of your static features and let LSTM handle the rest.

例如,您转换后的数据将如下所示:

For example your transformed data will look like this:

                water rate   pump speed   total produced water   depth_wall
2000-01-01         10            4                 1120             100
2000-01-02         20            8                 1140             100
2000-01-03         10            4                 1150             100
2000-01-04         10            3                 1160             100
2000-01-05         10            4                 1170             100

选项 2:设计多头网络.

Option 2: Designing multi-head networks.

TIME_SERIES_INPUT ------> LSTM -------\
                                       *---> MERGE / Concatenate ---> [more layers]
STATIC_INPUTS --> [FC layer/ conv] ---/

这是一篇解释组合策略的论文:https://arxiv.org/pdf/1712.08160.pdf

Here is a paper explaining a combining strategy: https://arxiv.org/pdf/1712.08160.pdf

下面是利用选项2另一纸: https://www.researchgate.net/publication/337159046_Classification_of_ECG_signals_by_dot_Residual_LSTM_Network_with_data_augmentation_for_anomaly_detection

Here is another paper utilizing option 2: https://www.researchgate.net/publication/337159046_Classification_of_ECG_signals_by_dot_Residual_LSTM_Network_with_data_augmentation_for_anomaly_detection

论文 2 的源代码:https://github.com/zabir-nabil/dot-res-lstm

这篇关于如何在预测中结合静态特征和时间序列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆