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

Inverse option for prediction results (denormalize) #60

Closed koseoyoung closed 1 year ago

koseoyoung commented 1 year ago

Hi, I'm trying to get the prediction results of de-normalized values from the both self-supervised and supervised modes of PatchTST. I'm reading through the code, but I can't find the inverse option.

Do you guys have the inverse option in place? Otherwise, I try to add this feature. Do you think this would be possible in the current codebase?

yuqinie98 commented 1 year ago

Hi, currently we don't consider it to make the comparison consistent with previous projects like AutoFormer and FedFormer. You could easily add it in your own project. Thanks!

koseoyoung commented 1 year ago

Thanks! I've successfully added the inverse option for the supervised mode of PatchTST.

One more question is that I think currently the self-supervised model is normalizing the ETT dataset twice. Is it expected behavior? Can I skip the first normalization?

  1. First is in here https://github.com/yuqinie98/PatchTST/blob/main/PatchTST_self_supervised/src/data/pred_dataset.py#L158
  2. The second is here https://github.com/yuqinie98/PatchTST/blob/main/PatchTST_self_supervised/src/callback/transforms.py#L32

Thank you!

yuqinie98 commented 1 year ago

Yeah I think you can skip one. Thanks for asking!

koseoyoung commented 1 year ago

Thanks a lot for the confirmation!

Neverzzj commented 10 months ago

谢谢!我已经成功地为 PatchTST 的监督模式添加了反向选项。

另一个问题是,我认为目前的自我监督模型正在对ETT数据集进行两次规范化。这是预期行为吗?我可以跳过第一次规范化吗?

  1. 首先是在这里 https://github.com/yuqinie98/PatchTST/blob/main/PatchTST_self_supervised/src/data/pred_dataset.py#L158
  2. 第二个在这里 https://github.com/yuqinie98/PatchTST/blob/main/PatchTST_self_supervised/src/callback/transforms.py#L32

谢谢!

您好,请问您是如何在监督模式下添加反转选项进行反归一化的呢?期待您的回复,我的邮箱是747814502@qq.com

ssssbug commented 7 months ago

谢谢!我已经成功地为 PatchTST 的监督模式添加了反向选项。

还有一个问题是,我认为目前自监督模型正在对 ETT 数据集进行两次归一化。这是预期行为吗?我可以跳过第一次规范化吗?

  1. 首先是在这里 https://github.com/yuqinie98/PatchTST/blob/main/PatchTST_self_supervised/src/data/pred_dataset.py#L158
  2. 第二个是这里 https://github.com/yuqinie98/PatchTST/blob/main/PatchTST_self_supervised/src/callback/transforms.py#L32

谢谢!

您好,看到您已经成功在监督模式下添加逆归一化,我想知道应该在什么位置添加?期待您的回复,我的邮箱是938200020@qq.com