cure-lab / SCINet

The GitHub repository for the paper: “Time Series is a Special Sequence: Forecasting with Sample Convolution and Interaction“. (NeurIPS 2022)
Apache License 2.0
633 stars 128 forks source link

data scaler in etth_data_loader.py #16

Closed PhoebeChen123 closed 2 years ago

PhoebeChen123 commented 2 years ago

train_data = df_data[border1s[0]:border2s[0]] self.scaler.fit(train_data.values) data = self.scaler.transform(df_data.values)

Here, why the mean and var of train data are computed to scale all the data?

AlexMinhao commented 2 years ago

Hi,

Since we can't get the whole data in advance during the online prediction, only training data is available for calculating mean and std when scaling data. Thanks.