Skip to content

Instantly share code, notes, and snippets.

@curiousily
Created April 23, 2020 19:43
Show Gist options
  • Save curiousily/0f7764c07b763a0de3f532b16a3434ac to your computer and use it in GitHub Desktop.
Save curiousily/0f7764c07b763a0de3f532b16a3434ac to your computer and use it in GitHub Desktop.
enc = OneHotEncoder(handle_unknown='ignore', sparse=False)
enc = enc.fit(y_train)
y_train = enc.transform(y_train)
y_test = enc.transform(y_test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment