We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from keras.utils import np_utils from sklearn.preprocessing import LabelEncoder
X_train = np.array(trainfeatures) y_train = np.array(trainlabel) X_test = np.array(testfeatures) y_test = np.array(testlabel)
lb = LabelEncoder()
y_train = np_utils.to_categorical(lb.fit_transform(y_train)) y_test = np_utils.to_categorical(lb.fit_transform(y_test))
The text was updated successfully, but these errors were encountered:
Can you elaborate please? What is the error, what were you doing and what is the expected output?
Sorry, something went wrong.
Error: TypeError: Encoders require their input to be uniformly strings or numbers. Got ['int', 'str']
I was changing to categorical values; getting this error
Can I get an early response ...in a bit of hurry
No branches or pull requests
from keras.utils import np_utils
from sklearn.preprocessing import LabelEncoder
X_train = np.array(trainfeatures)
y_train = np.array(trainlabel)
X_test = np.array(testfeatures)
y_test = np.array(testlabel)
lb = LabelEncoder()
y_train = np_utils.to_categorical(lb.fit_transform(y_train))
y_test = np_utils.to_categorical(lb.fit_transform(y_test))
The text was updated successfully, but these errors were encountered: