Перейти к содержимому

Confusion Matrix, Accuracy, Precision, Recall and F1

Harban AI LABS

0:00 / 0:00

Confusion Matrix, Accuracy, Precision, Recall and F1

14 просмотров · 8 дн. назад
Harban AI LABS
41 подписчик
14 просмотров · 8 дн. назад
Classification metrics explained: the confusion matrix, accuracy, precision, recall and the F1 score, and why accuracy can mislead. A model that screens patients is 99% accurate. It says "healthy" to everyone, and it has never found a single sick person. This video shows the numbers that expose such a model: the confusion matrix, precision, recall and the F1 score, each computed from a small example you can follow by hand. You will learn: Why accuracy alone misleads on imbalanced data (1,000 patients, 10 sick, a model that always says "healthy") The confusion matrix: real predictions sorted into four boxes True/false positive/negative: a way to read the names so that they stick Precision: of those I flagged, how many were right Recall: of those that were really positive, how many did I find The trade-off when the threshold moves, shown live on one set of scores The F1 score as the harmonic mean, and why not the ordinary average (precision 1.0, recall 0.1) Which mistake costs more: a spam filter against a screening test A short note on more than two classes: macro and weighted averages All numbers in this video are made up or simulated for teaching. They describe no real disease, test or study. Chapters 0:00 99% accurate, and useless 0:33 Why accuracy misleads on imbalanced data 1:26 The confusion matrix: four boxes 1:59 True/false positive/negative: names that stick 2:50 Precision 3:09 Recall 3:35 Moving the threshold: a question 4:38 Why not the ordinary average? 5:04 The F1 score (harmonic mean) 5:36 Which mistake costs more? 6:04 More than two classes: macro and weighted 6:34 Recap + try it yourself Try it yourself: a spam filter flags 10 emails. 8 of them really are spam. The inbox held 20 spam emails in total. Compute precision, recall and F1. Which mistake does this filter make more often? Animations made with Manim Community Edition. The narration is a synthetic voice. #MachineLearning #ConfusionMatrix #AIEngineer More from Harban AI Labs: https://harban-ai-labs.vercel.app/