Skip to content

Normalization on the whole dataset? #18

@AlainOUYANG

Description

@AlainOUYANG

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions