Skip to content

Instantly share code, notes, and snippets.

@sararob
Created August 14, 2018 18:24
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 sararob/2eb00c269ff90f025f8623f948e67180 to your computer and use it in GitHub Desktop.
Save sararob/2eb00c269ff90f025f8623f948e67180 to your computer and use it in GitHub Desktop.
encoder = MultiLabelBinarizer()
encoder.fit_transform(train_genres)
train_encoded = encoder.transform(train_genres)
test_encoded = encoder.transform(test_genres)
num_classes = len(encoder.classes_)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment