cure-lab / LTSF-Linear

[AAAI-23 Oral] Official implementation of the paper "Are Transformers Effective for Time Series Forecasting?"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

the kernel size setting for the Series decomposition block

rdyan0053 opened this issue · comments

# Decompsition Kernel Size
kernel_size = 25
self.decompsition = series_decomp(kernel_size)
self.individual = configs.individual
self.channels = configs.enc_in

For the Series decomposition block, I want to know:
If my time series data takes "day" as a period, specifically 288 data points (288=24h/5min) as a period, should I set kernel_size to an integral multiple of 288? Would it be better? For example, if the length of my input data seq_len can only be 336, would it be better to set kernel_size to 288 instead of 25?
The reason for this idea is that I used the default parameters seq_len = 336 and kernel_size=25. It turned out that the error always appeared at 8:00 am and 18:00 pm every day, as shown below.
(对于 Series decomposition模块,我想知道:
如果我的时间序列数据以“天”为一个周期,具体来说是288个数据点(288=24h/5min)为一个周期,我是否应该将这里的kernel_size设置为288的整数倍? 这样做是不是会更好? 例如,如果我的输入数据 seq_len 的长度只能是 336,那么是不是应该将 kernel_size 设置为 288 而不是 25?
之所以有这样的想法,是因为我使用了默认的参数seq_len = 336kernel_size=25,结果发现误差总是出现在每天的早上8点以及下午18点,如下图)
image

Also, I would like to ask, is setting the parameter freq useful? I feel that for a time granularity of 5mins, set freq to t (corresponding to minutes) or h (corresponding to hours), two results are basically the same.

另外想请教一下,参数freq的设定有用吗,我感觉对于5mins的时间粒度来说,将freq设置为t(对应分钟)或者是h(对应小时),两个结果基本上差不多

kernel_size是一个超参,我们没有调过这个超参,所以别的size效果可能更好。你可以尝试visualize一下trend看看288后的trend看起来会不会比25的好

freq对transformer模型有效果,但是对我们的linear模型没有用,因为我们没有用到这个参数

太感谢了!!!