Skip to content

Instantly share code, notes, and snippets.

@lazuxd
Created February 7, 2020 17:59
Show Gist options
  • Save lazuxd/6bce44ce85b5a2024bfe7cc8dd16285f to your computer and use it in GitHub Desktop.
Save lazuxd/6bce44ce85b5a2024bfe7cc8dd16285f to your computer and use it in GitHub Desktop.
Building a Sentiment Classifier using Scikit-Learn
X_test = bigram_vectorizer.transform(imdb_test['text'].values)
X_test = bigram_tf_idf_transformer.transform(X_test)
y_test = imdb_test['label'].values
score = sgd_classifier.score(X_test, y_test)
print(score)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment