Classification Reports

tags: #ML/supervised/classification/logit

To return the precision, recall, and F1-score for each class:

from sklearn.metrics import classification_report
print(classification_report(y_test_writing,y_pred))

Sample output:

               precision    recall  f1-score   support

           0       0.89      0.95      0.92       156
           1       0.92      0.84      0.88       112

    accuracy                           0.90       268
   macro avg       0.90      0.90      0.90       268
weighted avg       0.90      0.90      0.90       268
What is "support"?

It represents the number of instances that are actually labeled as belonging to a particular class.

Powered by Forestry.md