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

周期选择和变2D时的length设定 #7

Closed
water-wbq opened this issue Feb 20, 2023 · 3 comments
Closed

周期选择和变2D时的length设定 #7

water-wbq opened this issue Feb 20, 2023 · 3 comments

Comments

@water-wbq
Copy link

作者您好,非常感谢您做的扎实、具有启发性的工作。
我在学习您文章和代码时,遇到了如下问题,希望您能帮忙解惑:
Q1: 在FFT_for_Period中,有一步 frequency_list[0] = 0,请问这边赋值为0的目的/好处是什么?
Q2: 在1D变2D时,涉及到了 length = (((self.seq_len + self.pred_len) // period) + 1) * period,我不是很明白这边为什么要把self.pred_len也加入进去?
期待回复,谢谢!

@wuhaixu2016
Copy link
Member

您好,感谢关注!
Q1: Freq[0]具有一些特殊含义,表示的是整个信号的能量值。所以相比于周期性,它更多地代表的是信号整体的特征,所以我们把它置0来避免选到这个频率。如果序列没有周期性的话,只要选到Freq[1]就可以了。
Q2: 对于预测任务来说,TimesNet的pipeline是:在embedding之后先将序列长度扩充为self.seq_len + self.pred_len,然后再不断refine预测结果。所以在中间层的TimesBlock其实在处理预测的中间结果(其长度为self.seq_len + self.pred_len)。但是对于其他任务,self.pred_len=0,所以加和不加self.pred_len没有影响。

@water-wbq
Copy link
Author

非常感谢!我的疑问已被解决。
我这边就把这个issue close了

@heiXun
Copy link

heiXun commented Jan 7, 2024

exp = Exp(args) # set experiments
Use CPU
Traceback (most recent call last):

Cell In[20], line 1
exp = Exp(args) # set experiments

File G:\博士课题组\代码\Time-Series-Library-main\Time-Series-Library-main\exp\exp_classification.py:18 in init
super(Exp_Classification, self).init(args)

File G:\博士课题组\代码\Time-Series-Library-main\Time-Series-Library-main\exp\exp_basic.py:31 in init
self.model = self._build_model().to(self.device)

File G:\博士课题组\代码\Time-Series-Library-main\Time-Series-Library-main\exp\exp_classification.py:24 in _build_model
self.args.seq_len = max(train_data.max_seq_len, test_data.max_seq_len)

AttributeError: 'Dataset_ETT_minute' object has no attribute 'max_seq_len'
作者您好,我在学习代码过程中,遇到这个问题,麻烦作者能不能帮我看一下问题在哪呀,非常感谢作者

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