yuqinie98 / PatchTST

An offical implementation of PatchTST: "A Time Series is Worth 64 Words: Long-term Forecasting with Transformers." (ICLR 2023) https://arxiv.org/abs/2211.14730
Apache License 2.0
1.37k stars 248 forks source link

Question about multivariate prediction of input data #70

Open 1348598339 opened 11 months ago

1348598339 commented 11 months ago

Hi,my input data is image data compressed by a stack self-encoder, compressed as a vector of length 324, which is equivalent to 324 variables to be predicted, is such compressed data suitable to be used with the PatchTST model, and if I want to predict the future year's data (4380 in total), is it possible to run the predict function individually after completing the training and write each prediction at the end of the data file, and then run the predict function again individually?

yuqinie98 commented 11 months ago

Hi, as long as the input data is a multivariate time series (or sequential data), and you want to use a L look-back window to forecast the future T steps (which means the input shape is [M, L] and output shape is [M, T]), you can use PatchTST to do it.

1348598339 commented 11 months ago

Hi, as long as the input data is a multivariate time series (or sequential data), and you want to use a L look-back window to forecast the future T steps (which means the input shape is [M, L] and output shape is [M, T]), you can use PatchTST to do it.

Thank you very much for your answer, I still have questions. If tuning is required, which parameters will have a large impact on the model and what should their corresponding ranges be, and if the separation of patches is to be achieved, do I need to set both the INDIVIDUAL and DECROSION parameters to TRUE?

yuqinie98 commented 11 months ago

Hi,

Thanks for the question. We do ablation on hyperparameters in the appendix. INDIVIDUAL is the idea from DLinear paper and you can set it as False in default. Sorry I haven't found DECROSION.

1348598339 commented 11 months ago

It's the parameters DECOMPOSITION, sorry for wrong typing

yuqinie98 commented 11 months ago

This is also the same as DLinear repo: https://github.com/cure-lab/LTSF-Linear

1348598339 commented 11 months ago

Thank you very much, I have another question, most of my data ranges from magnitude tens to positive tens in feature Thank you very much, I have two more questions, my data in the feature dimension of most of the range for the amplitude of tens to positive tens, is it necessarily need to regularize the data, the second question for the data is now the number of features of 324, if I reduce the number of features, will it help to improve the prediction accuracy?

yuqinie98 commented 10 months ago

The code has REVIN normalization. Sorry I am not sure about how many features you need as output. Here the basic PatchTST has the same input and output features.