Skip to content

Instantly share code, notes, and snippets.

@BinarySpoon
Created January 11, 2021 07:57
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 BinarySpoon/2f7414add30b887db61a4552e1d4af9f to your computer and use it in GitHub Desktop.
Save BinarySpoon/2f7414add30b887db61a4552e1d4af9f to your computer and use it in GitHub Desktop.
#5 Measuring performance (accuracy) -->
lr_score = lgr.score(x_test, y_test)
svc_score = svc.score(x_test,y_test)
rf_score = rf.score(x_test,y_test)
knn_score = knn.score(x_test,y_test)
print('Accuracy Score -->')
print('------------------')
print()
print('Logistic Regression: ', lr_score)
print()
print('Support Vector Machines: ', svc_score)
print()
print('Random Forrest: ', rf_score)
print()
print('K Nearest Neighbors: ', knn_score)
print('------------------')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment