Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created May 26, 2021 11:11
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 amankharwal/77091edfb82cf5f112c948fea57bb2a9 to your computer and use it in GitHub Desktop.
Save amankharwal/77091edfb82cf5f112c948fea57bb2a9 to your computer and use it in GitHub Desktop.
from sklearn.preprocessing import LabelBinarizer
lb = LabelBinarizer()
y2 = lb.fit_transform(y)
print(y2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment