Block 77: Evaluation Metrics (Classification)
Go beyond accuracy to fully evaluate classification models.
Concepts
- Confusion matrix: TP, TN, FP, FN
- Precision, Recall, F1-score
- classification_report()
- ROC curve and AUC for binary classification
Code Examples
See exercise below.
Exercise
Evaluate a classifier with classification_report and a confusion matrix heatmap. Plot the ROC curve for a binary classification problem.
Homework
Explain precision vs recall in plain English using a spam detection or cancer detection example.