nzl5116190 / Basisformer

This is the pytorch implementation of Basisformer in the Neurips paper: [BasisFormer: Attention-based Time Series Forecasting with Learnable and Interpretable Basis]
82 stars 8 forks source link

多变量预测单变量 #1

Closed ZeroTwo996 closed 11 months ago

ZeroTwo996 commented 1 year ago

作者您好,我想请问一下这个怎么实现MS,就是多变量预测1个变量

nzl5116190 commented 12 months ago

Answer (English Version)

Hello, regarding the implementation of multivariate (M) prediction for a single variable (S), MS represents a relatively uncommon setup in time series forecasting. This particular setup was not covered in our experiments. However, if you are looking to implement MS, I believe there are two possible approaches you might consider:

  1. Adopt a multivariate (M) setting, but supervise only one of the time series.
  2. Use a multivariate (M) setting and add a linear layer or a Multi-Layer Perceptron (MLP) at the end of the model. This layer should act on the channel dimension, reducing the number of channels from multiple to one.

It's important to note that I have not personally implemented these methods. However, based on my understanding, the second approach might offer better forecasting results.

回答(中文版) / Answer (Chinese Version)

您好,关于实现多变量(M)预测单一变量(S)的问题,MS是一种在时间序列预测中较为罕见的设定。在我们的实验中,这种设定并未涉及。然而,如果您希望尝试实现MS,我认为可以考虑以下两种方法:

  1. 采用多变量(M)的设置,但仅对其中一个时间序列进行监督学习。
  2. 在多变量(M)的基础上,在模型的最后一层加入一个线性层或多层感知机(MLP),这一层将作用于通道维度,将多个通道的数量减少至1。

需要注意的是,我个人并未实际实施过这两种方法。但根据我的理解,第二种方法可能会带来更优的预测效果。