Skip to content

Instantly share code, notes, and snippets.

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 saimadhu-polamuri/8114a8e40c62331f40115e7457a59632 to your computer and use it in GitHub Desktop.
Save saimadhu-polamuri/8114a8e40c62331f40115e7457a59632 to your computer and use it in GitHub Desktop.
# Train and test accuracy
train_predictions = get_predictions(nlp, x_train)
test_predictions = get_predictions(nlp, x_test)
train_accuracy = accuracy_score(y_train, train_predictions)
test_accuracy = accuracy_score(y_test, test_predictions)
print("Train accuracy: {}".format(train_accuracy))
print("Test accuracy: {}".format(test_accuracy))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment