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

关于结果的范围 #46

Closed Aaron-yhj closed 1 year ago

Aaron-yhj commented 1 year ago

尊敬的作者您好!非常感谢您所提出的杰出的模型。在将PatchTST作用于自己的数据集时,发现模型输出的数值范围与数据集中的数据值域范围有很大出入,经过阅读代码发现在Dataset中有scale默认为True。请问:如何将经过scale的数据的输出缩放为原本数据的值域范围呢?期待您的回答。

yuqinie98 commented 1 year ago

Hi @Aaron-yhj , I understand your thought. We normalize the output to be consistent with previous papers. You could use this function to transfer the signal back to the original scale: https://github.com/yuqinie98/PatchTST/blob/main/PatchTST_supervised/data_provider/data_loader.py#LL289C1-L290C1.

Aaron-yhj commented 1 year ago

Hi @Aaron-yhj , I understand your thought. We normalize the output to be consistent with previous papers. You could use this function to transfer the signal back to the original scale: https://github.com/yuqinie98/PatchTST/blob/main/PatchTST_supervised/data_provider/data_loader.py#LL289C1-L290C1.

Thanks for your reply, it's very helpful for me