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.51k stars 262 forks source link

Data Loader use_time_features flag #28

Closed ikvision closed 1 year ago

ikvision commented 1 year ago

Thank you for the excellent code base that is very flexible and clear. Comparing the data loader between supervised to self-supervised it seem:

  1. Self supervised has use_time_features=False by default https://github.com/yuqinie98/PatchTST/blob/main/PatchTST_self_supervised/src/data/pred_dataset.py#L97
  2. Supervised does has use_time_features effectively always True https://github.com/yuqinie98/PatchTST/blob/main/PatchTST_supervised/data_provider/data_loader.py#L390

Questions:

  1. How important are the time feature for model performance?
  2. Why is the behaviour different between the two self-supervised and supervised ?
yuqinie98 commented 1 year ago

Hi @ikvision, sorry for the late reply. Actually the use_time_features controls whether to output seq_x_mark, seq_y_mark. And in supervised code, even though we get it from dataloader, we haven't used it. We are developing the supervised and self-supervised codes based on different codebases so there are some difference in the expression. Sorry for the confusion!

ikvision commented 1 year ago

@yuqinie98 thank you noting that seq_x_mark, seq_y_mark are not used in the supervised setting. It simplifies the implementation of a dataloader to an additional data source