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

Normalization on the whole dataset? #18

Open
AlainOUYANG opened this issue Oct 25, 2021 · 0 comments
Open

Normalization on the whole dataset? #18

AlainOUYANG opened this issue Oct 25, 2021 · 0 comments

Comments

@AlainOUYANG
Copy link

Hello Prof. LAI,

At line 125 in utils.py, inside the _normalized() function, it seems that a normalization of the whole dataset is performed for both the train, valid, and test sets.

# normalized by the maximum value of each row(sensor).
if normalize == 2:
	for i in range(self.m):
    	self.scale[i] = np.max(np.abs(self.raw_data[:, i]))  # <- This line
        self.dat[:, i] = self.raw_data[:, i] / np.max(np.abs(self.raw_data[:, i]))

I think it is not proper to use the information in the test data for training.

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