Skip to content

Instantly share code, notes, and snippets.

@ashishpatel26
Created July 18, 2018 15:57
Show Gist options
  • Save ashishpatel26/2ee5b19720ab5dc71ad8e40d5b6fd496 to your computer and use it in GitHub Desktop.
Save ashishpatel26/2ee5b19720ab5dc71ad8e40d5b6fd496 to your computer and use it in GitHub Desktop.
from sklearn.preprocessing import OneHotEncoder
# Dummy encoding, the target value of IRIS data set, return the value of the dummy data encoding
OneHotEncoder().fit_transform(iris.target.reshape((-1,1)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment