Skip to content

Instantly share code, notes, and snippets.

@sararob sararob/label-encoder.py Secret
Created Aug 14, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.