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

you didn't use the standardized data (X_std) for splitting into train and test subsets #2

Open
higherdim opened this issue Aug 6, 2023 · 0 comments

Comments

@higherdim
Copy link

In your code, you didn't use the standardized data (X_std) for splitting into train and test subsets. You used the original X data. Typo?

`

Separating X vs. y dataframes

X_std = pd.DataFrame(std_scaler.fit_transform(X), columns=X.columns)
y = healthy_df['age']

Separating dataset into train and test subsets

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.33, random_state = 42)
`

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