Created
November 6, 2022 13:36
-
-
Save rdisipio/95ae255b2ef0f186c68c5dbd525f036d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import tensorflow as tf | |
from sklearn import preprocessing | |
X_scaled = preprocessing.StandardScaler().fit_transform(X) | |
y_onehot = preprocessing.OneHotEncoder(sparse=False).fit_transform(y.reshape(-1, 1)) | |
( | |
X_train, | |
X_test, | |
y_train, | |
y_test | |
) = train_test_split(X_scaled, y_onehot, test_size=0.3, random_state=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment