thuml / Autoformer

About Code release for "Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting" (NeurIPS 2021), https://arxiv.org/abs/2106.13008
MIT License
2k stars 429 forks source link

如何获得原始数据值 #124

Closed w17716383006 closed 1 year ago

w17716383006 commented 1 year ago

实验结果应该做了归一化吧?如何做反归一化获取原始的值呢?我在exp_main.py中的 def test(self, setting, `test=0)函数中添加了 zer = np.zeros((preds.shape[-2], test_data.data_x.shape[-1])) trues = trues[0] trues = np.concatenate((zer[:, :-1], trues), axis=1) trues = test_data.inverse_transform(zer) 这个代码,但是得到的trues并不是原来的trues值。

wuhaixu2016 commented 1 year ago

您好,inverse_transform中的mean和std是训练数据集中统计出来的。可以参考这个issue:https://github.com/thuml/Autoformer/issues/6