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

Operation on Dataset #53

Closed
Zero-coder opened this issue May 19, 2022 · 5 comments
Closed

Operation on Dataset #53

Zero-coder opened this issue May 19, 2022 · 5 comments

Comments

@Zero-coder
Copy link
Contributor

`border1s = [0, 12 * 30 * 24 - self.seq_len, 12 * 30 * 24 + 4 * 30 * 24 - self.seq_len]
border2s = [12 * 30 * 24, 12 * 30 * 24 + 4 * 30 * 24, 12 * 30 * 24 + 8 * 30 * 24]
border1 = border1s[self.set_type]
border2 = border2s[self.set_type]#没看懂

    if self.features == 'M' or self.features == 'MS':#输入
        cols_data = df_raw.columns[1:]#DataFrame.columns属性以返回给定 DataFrame 的列标签,这里不要date
        df_data = df_raw[cols_data]#再通过列名索引取出数据
    elif self.features == 'S':
        df_data = df_raw[[self.target]]#只取OT这一列作为输入

    if self.scale:#scale在_init_初始化True
        train_data = df_data[border1s[0]:border2s[0]]#不知道为什么可以问问author_wu
        self.scaler.fit(train_data.values)#简单来说,求得训练集的均值、方差、最大值、最小值等属性,对数据进行拟合
        data = self.scaler.transform(df_data.values)#在fit的基础上,进行归一化等
    else:
        data = df_data.values`  in data_provider  data_loader.py  Class Dataset_ETT_hour(Dataset)

Thanks for watching this,I wonder why and how you set the border and why train_data = df_data[border1s[0]:border2s[0]]

@Zero-coder
Copy link
Contributor Author

in data_provider data_loader.py Class Dataset_ETT_hour(Dataset)

@wuhaixu2016
Copy link
Member

This is quite plain, you can print the intermediate results.
For more discussion, you can refer to #20

@Zero-coder
Copy link
Contributor Author

Thank you very much for advice

@Zero-coder
Copy link
Contributor Author

Simple explaination for train、val、test:https://github.com/zhouhaoyi/Informer2020/issues/164

@Zero-coder
Copy link
Contributor Author

border1s = [0, 12 * 30 * 24 - self.seq_len, 12 * 30 * 24 + 4 * 30 * 24 - self.seq_len]
border2s = [12 * 30 * 24, 12 * 30 * 24 + 4 * 30 * 24, 12 * 30 * 24 + 8 * 30 * 24]
border1 = border1s[self.set_type]#开始值,从数组border1s选一个值代表train、val、test
border2 = border2s[self.set_type]#结束值,从数组border2s选一个值代表train、val、test

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

2 participants