Skip to content

Instantly share code, notes, and snippets.

@ashishpatel26
Created July 18, 2018 15:57
Show Gist options
  • Save ashishpatel26/3e1754d60bdcd341459c03f2e28299e7 to your computer and use it in GitHub Desktop.
Save ashishpatel26/3e1754d60bdcd341459c03f2e28299e7 to your computer and use it in GitHub Desktop.
from sklearn.preprocessing import Binarizer
# Binarization, a threshold value is set to 3, the return data is binarized
Binarizer(threshold=3).fit_transform(iris.data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment