Skip to content

Instantly share code, notes, and snippets.

@rohanjoseph93
Last active September 22, 2023 10:36
Show Gist options
  • Save rohanjoseph93/fb2395a5426832c47206f439b54df2e3 to your computer and use it in GitHub Desktop.
Save rohanjoseph93/fb2395a5426832c47206f439b54df2e3 to your computer and use it in GitHub Desktop.
# Model Evaluation metrics
from sklearn.metrics import accuracy_score,recall_score,precision_score,f1_score
print('Accuracy Score : ' + str(accuracy_score(y_test,y_pred)))
print('Precision Score : ' + str(precision_score(y_test,y_pred)))
print('Recall Score : ' + str(recall_score(y_test,y_pred)))
print('F1 Score : ' + str(f1_score(y_test,y_pred)))
#Dummy Classifier Confusion matrix
from sklearn.metrics import confusion_matrix
print('Confusion Matrix : \n' + str(confusion_matrix(y_test,y_pred)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment