Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/308.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 预测中如何将静态特征与时间序列相结合_Python_Static_Time Series_Recurrent Neural Network - Fatal编程技术网

Python 预测中如何将静态特征与时间序列相结合

Python 预测中如何将静态特征与时间序列相结合,python,static,time-series,recurrent-neural-network,Python,Static,Time Series,Recurrent Neural Network,我试图找到一个类似的问题及其答案,但没有成功。这就是为什么我要问一个以前可能会被问到的问题: 我正在研究一个问题,即输出几个水井的累积产水量。我拥有的特征包括时间序列(随时间变化的水量和泵速)和静态(井深、井纬度和经度、含水带厚度等) 对于井#1,我的输入数据如下所示 动态数据: water rate pump speed total produced water 2000-01-01 10 4

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

我正在研究一个问题,即输出几个水井的累积产水量。我拥有的特征包括时间序列(随时间变化的水量和泵速)和静态(井深、井纬度和经度、含水带厚度等)

对于井#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等)?

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

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

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

                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:设计多头网络

TIME_SERIES_INPUT ------> LSTM -------\
                                       *---> MERGE / Concatenate ---> [more layers]
STATIC_INPUTS --> [FC layer/ conv] ---/
下面是一篇解释合并策略的文章:

下面是另一篇利用选项2的论文:

论文2的源代码: