gpt4 book ai didi

python - 如何在预测中结合静态特征和时间序列

转载 作者:行者123 更新时间:2023-12-04 10:11:50 27 4
gpt4 key购买 nike

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

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

对于井#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] ---/

这是一篇解释组合策略的论文: 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

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

关于python - 如何在预测中结合静态特征和时间序列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61300023/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com