Confusion Matrix: Dr. P. K. Chaurasia
Confusion Matrix: Dr. P. K. Chaurasia
Dr. P. K. Chaurasia
Associate Professor,
Department of Computer Science and
Information Technology
MGCUB, Motihari, Bihar
Outline
Introduction
Confusion Matrix
Matrix Terms
Measure Terms
Review Questions
References
INTRODUCTION
• It is a table that is often used to describe the performance of a
classification model on a set of test data for which the true
values are known.
• Accuracy:
– It is how close a measured value to the actual (True)
value.
= (55+105)/185
= 0.86
Cont…
• Precision:
– It is how close the measured values are to each other.
= 105 / 120
= 0.87
Recall
• Recall:
– It is the ratio of all correctly predicted positive
predictions
Recall = TP / Actual Yes
= 105 / 115
= 0.91
Cont…
• Error Rate:
– It is calculated as the number of all incorrect
predictions divided by the total number of the
datasets.
– The best error rate is 0.0
– The worst error rate is 1.0.
Error Rate = 1 - Accuracy = (FN + FP) / Total
= 1 - 0.86 = (15 +10) /185
= 0.14
Review Questions
List of Books
Understanding Machine Learning: From Theory to Algorithms.
Introductory Machine Learning notes
Foundations of Machine Learning
List of website for references
https://www.ic.unicamp.br/~wainer/cursos/1s2012/mc906/Confu
sion.pdf
https://www.geeksforgeeks.org/confusion-matrix-machine-
learning/