0
$\begingroup$

The given classification report was obtained from running a Random Forest binary classifier on the test data. There is huge class imbalance in the training data. How do I interpret the given classification report showing very high values for one particular label?

            precision    recall  f1-score   support

      0       0.98      1.00      0.99     35050
      1       0.98      0.72      0.83      1982
  total       0.98      0.98      0.98     37032
$\endgroup$
1
$\begingroup$

Precision is the proportion of predictions of that class that are true. So 98% of the predictions for each of your classes are actually of the predicted class, and 2% are actually of the opposite class. Recall is the proportion of the true positives that are identified as such. This means that your model is correctly identifying 100% of the class 0s, but only 72% of the class 1s.

F1-Score is a kind of average of the two; it's an attempt to provide a unified figure of the model's performance, but personally I consider it less useful than the separate figures. It's calculated via the formula 2 x ((precision x recall) / (precision + recall)).

Wikipedia's pages on these metrics are comprehensive:

https://en.wikipedia.org/wiki/Precision_and_recall
https://en.wikipedia.org/wiki/F1_score

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.