Closed PhoebeChen123 closed 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?
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.
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?