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

Ch12, when standard the train data #134

Open
JPL-JUNO opened this issue Jul 6, 2023 · 1 comment
Open

Ch12, when standard the train data #134

JPL-JUNO opened this issue Jul 6, 2023 · 1 comment

Comments

@JPL-JUNO
Copy link

JPL-JUNO commented Jul 6, 2023

X_train_norm = (X_train - np.mean(X_train)) / np.std(X_train) use the mean and std of whole dataset. I think the correct way is to use mean and std of each column, X_train_norm = (X_train - np.mean(X_train, axis=0)) / np.std(X_train, axis=0)

X_train_norm = (X_train - np.mean(X_train)) / np.std(X_train)

(forgive my poor English)

@rasbt
Copy link
Owner

rasbt commented Jul 6, 2023

You are totally right, thanks for the note! (cc @haydenliu )

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