true positive true negative false positive false negative in the spirit of table for hypothesis testingit is sometimes useful to divide the elements of confusion matrix into four groups the diagonal elements are the true positive countsthat isthe numbers of correct classifications for each class the true positive counts for the dogcatand possum classes in table are and respectively similarlythe true negative count for class is the sum of all matrix elements that do not belong to the row or the column of this particular class for the dog class it is the false positive count for class is the sum of the corresponding column elements without the diagonal element for the dog class it is finallythe false negative count for specific classcan be calculated by summing over the corresponding row elements (againwithout counting the diagonal elementfor the dog class it is in terms of the elements of the confusion matrixwe have the following counts for class tp fp mk true positive false positive (column sumkj fn false negative jk (row sumkj tn fn fp tp true negative accuracy note that in the binary classification case ( )and using the indicator loss functionthe misclassification error ( can be written as fp fn ( error this does not depend on which of the two classes is consideredas fp fn fp fn similarlythe accuracy measures the fraction of correctly classified objectstp tn ( accuracy error in some casesclassification error (or accuracyalone is not sufficient to adequately describe the effectiveness of classifier as an exampleconsider the following two classification problems based on fingerprint detection system identification of authorized personnel in top-secret military facility identification to get an online discount for some retail chain both problems are binary classification problems howevera false positive in the first problem is extremely dangerouswhile false positive in the second problem will make customer happy let us examine classifier in the top-secret facility the corresponding confusion matrix is given in table table confusion matrix for authorized personnel classification predicted actual authorized non-authorized authorized non-authorized ,