Skip to content

Instantly share code, notes, and snippets.

@aravindpai
Created July 10, 2019 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aravindpai/7eceb9a5f17ccc2b2f52e6d8b6851b4e to your computer and use it in GitHub Desktop.
Save aravindpai/7eceb9a5f17ccc2b2f52e6d8b6851b4e to your computer and use it in GitHub Desktop.
from sklearn.preprocessing import LabelEncoder
le = LabelEncoder()
y=le.fit_transform(all_label)
classes= list(le.classes_)
@aishafathii
Copy link

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