Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from sklearn.preprocessing import LabelEncoder
le = LabelEncoder()
y=le.fit_transform(all_label)
classes= list(le.classes_)
@aishafathii

This comment has been minimized.

Copy link

@aishafathii aishafathii commented Oct 5, 2020

i got this error

File "E:\New folder (6)\lib\site-packages\sklearn\preprocessing\label.py", line 235, in fit_transform
y = column_or_1d(y, warn=True)

File "E:\New folder (6)\lib\site-packages\sklearn\utils\validation.py", line 760, in column_or_1d
raise ValueError("bad input shape {0}".format(shape))

ValueError: bad input shape (105, 2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment