简体   繁体   English

具有多个单变量时间序列的 LSTM 的第一种方法

[英]First approach to LSTM with multiple univariate time series

First of all, thank you for any help or comments you can make.首先,感谢您提供的任何帮助或评论。 I have been reading related posts since it is a quite discussed topic but I have not found anything that helps me.我一直在阅读相关的帖子,因为这是一个备受讨论的话题,但我没有找到任何对我有帮助的东西。

I present my problem:我提出我的问题:

  • Imagine that you know the variation in the average price of housing sales, monthly, in the last 10 years, in all the municipalities of 5 cities in your country.想象一下,您知道过去 10 年中,您所在国家 5 个城市的所有直辖市的每月平均住房销售价格的变化。 If we consider 100 municipalities per city, it will lead to 500 univariate time series.如果我们考虑每个城市 100 个自治市,它将导致 500 个单变量时间序列。

  • Given this situation, I want to develop a neural network model that uses the municipalities of three of those cities, 300 time series.鉴于这种情况,我想开发一个神经网络 model,它使用其中三个城市的自治市,300 个时间序列。 The objective is to see how he then generalizes it to the other two cities that he does not know.目的是看看他如何将其推广到他不知道的其他两个城市。

I am absolutely at a loss on how a model can be trained on such a large number of time series at once.我完全不知道如何一次在如此大量的时间序列上训练 model。

Since there are spatial temporal issues I don't think a vanilla LSTM will work well for these purposes.由于存在时空问题,我认为普通 LSTM 不能很好地用于这些目的。 You could potentially use graph neural networks (GNNs) they are good at learning spatial temporal dependencies.您可能会使用擅长学习时空依赖性的图神经网络 (GNN)。 Essentially here you could treat this as a multivariate time series forecasting problem like the authors of STEMGNN基本上在这里,您可以将其视为多元时间序列预测问题,就像STEMGNN的作者一样

In order to emphasize the relationships among multiple time-series, we formulate the problem of multivariate time-series forecasting based on a data structure called multivariate temporal graph, which can be denoted as G = (X,W).为了强调多个时间序列之间的关系,我们基于称为多元时间图的数据结构制定了多元时间序列预测问题,可以表示为 G = (X,W)。 X = {xit} ∈ RN×T stands for the multivariate time-series input, where N is the number of time-series (nodes), and T is the number of timestamps. X = {xit} ∈ RN×T 代表多元时间序列输入,其中 N 是时间序列(节点)的数量,T 是时间戳的数量。 We denote NN×N the observed values at timestamp t as Xt ∈ R.我们将时间戳 t 处的观测值 NN×N 表示为 Xt ∈ R。 W ∈ R is the adjacency matrix, where wij > 0 indicates that there is an edge connecting nodes i and j, and wij indicates the strength of this edge. W ∈ R 是邻接矩阵,其中 wij > 0 表示有一条边连接节点 i 和 j,wij 表示这条边的强度。

There are implementations publicly available.有公开可用的实现。 I recommend that you check out the PyTorch Geometric Library.我建议您查看PyTorch 几何库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM