Skip to content

Latest commit

 

History

History
95 lines (63 loc) · 3.38 KB

File metadata and controls

95 lines (63 loc) · 3.38 KB

Classification

Back to Index

Essential Reading

Understanding Classifications

Classification Metrics

Confusion Matrix

ROC Curve

Classification Metrics in Sci-kit Learn

Extra Reading

Checklist

Check your knowledge:

  • How is classification different from regression?
  • What is difference between binary classification and multi-class classification? Give some examples
  • What are some of the different classification algorithms?
  • How do we test the accuracy of an algorithm?
  • Understand the following terms:
    • Confusion matrix
    • accuracy
    • true positive
    • false negative
  • What is ROC curve? How is that useful?
  • What is AUC? How is that used?

Exercises

Difficulty Level

★☆☆ - Easy
★★☆ - Medium
★★★ - Challenging
★★★★ - Bonus

EX-1: Draw a Confusion Matrix (★☆☆)

We have 10 type-A, and 20 type-B.
Imagine, we have a perfect classifier.
Draw a perfect confusion matrix

Predicted A Predicted B
Actual A (10) ??? ???
Actual B (20) ??? ???

EX-2: Draw a Confusion Matrix (★★☆)

From the previous example, the classifier produced the following:

  • for class A, out of 10 test samples, it predicted 7 correctly as A. 3 it mis-predicted as B
  • for class B, out of 20 test samples, it predicted 15 correctly as B, 5 it mis-predicted as A

Draw the confusion matrix

Predicted A Predicted B
Actual A (10) ??? ???
Actual B (20) ??? ???

And calculate the following:

  • accuracy
  • precision
  • recall