Skip to content

Instantly share code, notes, and snippets.

@jovianlin
Created November 9, 2016 07:27
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 jovianlin/8c0dc4b80b3d0cc369ec50d38905153d to your computer and use it in GitHub Desktop.
Save jovianlin/8c0dc4b80b3d0cc369ec50d38905153d to your computer and use it in GitHub Desktop.
Best Classifier Selector
# Snippet for identifying the best classifier from svm, per, KNN based on their respective (accuracy) scores.
idx = np.argmax([svm_accuracy, per_accuracy, knn_accuracy])
classifiers = {0: 'SVM', 1: 'Perceptron', 2: 'KNN'}
print('Best classifier is {}'.format(classifiers[idx]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment