Skip to content

Instantly share code, notes, and snippets.

@MariaLavrovskaya
Created June 14, 2019 11:59
Show Gist options
  • Save MariaLavrovskaya/a258bcc6d19b8af2e09e7cba98a98460 to your computer and use it in GitHub Desktop.
Save MariaLavrovskaya/a258bcc6d19b8af2e09e7cba98a98460 to your computer and use it in GitHub Desktop.
#From labels to dummy
from sklearn.preprocessing import OneHotEncoder
ohe = OneHotEncoder(sparse=False)
X_train_ohe = ohe.fit_transform(X_train_le)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment