Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用inverse反归一化报错 #12

Closed
AMINUSFELIX opened this issue Nov 26, 2024 · 3 comments
Closed

用inverse反归一化报错 #12

AMINUSFELIX opened this issue Nov 26, 2024 · 3 comments

Comments

@AMINUSFELIX
Copy link

AMINUSFELIX commented Nov 26, 2024

Traceback (most recent call last):
File "run.py", line 228, in
exp.test(setting, test=1)
File "G:\PythonProjects\TimeXer-main\exp\exp_long_term_forecasting.py", line 233, in test
outputs = test_data.inverse_transform(outputs.squeeze(0)).reshape(shape)
ValueError: cannot select an axis to squeeze out which has size not equal to one

按照 thuml/Time-Series-Library@20eff0e
修改后,依然报错:

Traceback (most recent call last):
File "run.py", line 228, in
exp.test(setting, test=1)
File "G:\PythonProjects\TimeXer-main\exp\exp_long_term_forecasting.py", line 231, in test
outputs = test_data.inverse_transform(outputs.reshape(shape[0] * shape[1], -1)).reshape(shape)
File "G:\PythonProjects\TimeXer-main\data_provider\data_loader.py", line 434, in inverse_transform
return self.scaler.inverse_transform(data)
File "G:\anaconda3\envs\TimeXer\lib\site-packages\sklearn\preprocessing_data.py", line 1052, in inverse_transform
X *= self.scale_
ValueError: non-broadcastable output operand with shape (96,1) doesn't match the broadcast shape (96,3)

@s1h3ibai
Copy link

你好 请问这个问题你解决了吗 ,我也有这个问题

@AMINUSFELIX
Copy link
Author

你好 请问这个问题你解决了吗 ,我也有这个问题

我也还没解决

@wang-lucy
Copy link
Collaborator

您好,这是由于在数据集归一化时对所有变量进行了归一化,导致在进行MS预测时输出的形状与数据集形状不匹配导致的,我们已经对exp代码进行了更新。感谢您的反馈!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants