1
1
"""
2
- The implementation of Transformer for the partially-observed time-series imputation task.
2
+ The implementation of Autoformer for the partially-observed time-series imputation task.
3
3
4
4
Refer to the paper "Wu, H., Xu, J., Wang, J., & Long, M. (2021).
5
5
Autoformer: Decomposition transformers with auto-correlation for long-term series forecasting. NeurIPS 2021.".
31
31
32
32
class Autoformer (BaseNNImputer ):
33
33
"""The PyTorch implementation of the Autoformer model.
34
- TimesNet is originally proposed by Wu et al. in :cite:`wu2021autoformer`.
34
+ Autoformer is originally proposed by Wu et al. in :cite:`wu2021autoformer`.
35
35
36
36
Parameters
37
37
----------
@@ -56,7 +56,7 @@ class Autoformer(BaseNNImputer):
56
56
factor :
57
57
The factor of the auto correlation mechanism for the Autoformer model.
58
58
59
- moving_avg_kernel_size :
59
+ moving_avg_window_size :
60
60
The window size of moving average.
61
61
62
62
dropout :
@@ -120,7 +120,7 @@ def __init__(
120
120
d_model : int ,
121
121
d_ffn : int ,
122
122
factor : int ,
123
- moving_avg_kernel_size : int ,
123
+ moving_avg_window_size : int ,
124
124
dropout : float = 0 ,
125
125
batch_size : int = 32 ,
126
126
epochs : int = 100 ,
@@ -149,7 +149,7 @@ def __init__(
149
149
self .d_model = d_model
150
150
self .d_ffn = d_ffn
151
151
self .factor = factor
152
- self .moving_avg_kernel_size = moving_avg_kernel_size
152
+ self .moving_avg_window_size = moving_avg_window_size
153
153
self .dropout = dropout
154
154
155
155
# set up the model
@@ -161,7 +161,7 @@ def __init__(
161
161
self .d_model ,
162
162
self .d_ffn ,
163
163
self .factor ,
164
- self .moving_avg_kernel_size ,
164
+ self .moving_avg_window_size ,
165
165
self .dropout ,
166
166
)
167
167
self ._send_model_to_given_device ()
0 commit comments