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

我想问在文章中,这样处理测试集是否有数据泄露。 #159

Open
chaserd opened this issue Jan 16, 2025 · 0 comments
Open

Comments

@chaserd
Copy link

chaserd commented Jan 16, 2025

选自class Dataset_PEMS(Dataset):类
` if self.scale:
self.scaler.fit(train_data)
data = self.scaler.transform(data)

    df = pd.DataFrame(data)
    df = df.fillna(method='ffill', limit=len(df)).fillna(method='bfill', limit=len(df)).values`

1.在测试集上进行bfill,会引入未来信息。
2.在测试集上进行标准化,会引入未来的均值和方差。

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

1 participant