Performance Measures in Classification

Performance Measures in Classification

Chapter 3: Performance Measures in Classification Dr. Xudong Liu Assistant Professor School of Computing University of North Florida Monday, 9/16/2019 1 / 8 Confusion Matrix Each row in a confusion matrix represents an actual class. Each colum in a confusion matrix represents a predicted class. Example (next slide): classify whether the digit in an image is 5. True negatives (TN): predicted negative examples that are actually negative. False positives (FP): predicted positive examples that are actually negative. False negatives (FN): predicted negative examples that are actually positive. True positives (TP): predicted positive examples that are actually positive. In Python, you may get it with confusion matrix method. Can extend to multi-class classification problems. Performance Measures 2 / 8 Confusion Matrix Performance Measures 3 / 8 Precision Precision is a way to look at the accuracy of the positive predictions: jTPj precision = jTPj+jFPj For the previous example, precision is 75%. But precision can be 100% if the classifier only makes one positive prediction that is correct. This would NOT be useful. Performance Measures 4 / 8 Recall Recall is a way to look at the percentage of positive examples predicted correctly: jTPj recall = jTPj+jFNj For the previous example, precision is 60%. Performance Measures 5 / 8 Precision/Recall Trade-off Classification models, e.g., SGDClassifier, often predict based on a computed score of a given example. If the score is below a set threshold, the example is predict negative; otherwise, positive. For the previous setting, all examples are sorted based on their scores. Performance Measures 6 / 8 Precision/Recall Trade-off Performance Measures 7 / 8 F1 Score The F1 score is the harmonic mean of precision and recall: 2 F1 = 1 1 precision + recall Unlike regular mean, harmonic mean gives more weight to low values. Therefore, the classifier’s F1 score is only high if both recall and precision are high. Performance Measures 8 / 8.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us