Created
October 30, 2019 17:42
-
-
Save grohith327/3d3ab1759f6a7a41654cbedbcd5dd7e8 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
from sklearn.utils import shuffle | |
from sklearn.model_selection import train_test_split | |
from sklearn.preprocessing import OneHotEncoder | |
enc = OneHotEncoder() | |
y_data = enc.fit_transform(y_data).toarray() | |
x_data, y_data = shuffle(x_data, y_data) | |
X_train, X_test, y_train, y_test = train_test_split(x_data, y_data, test_size=0.2,stratify=y_data,random_state=42) | |
X_train = X_train.reshape((-1,1025,87,1)) | |
X_test = X_test.reshape((-1,1025,87,1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment