Confusion matrix (Confusion Matrix)
Baidu Encyclopedia:
Confusion matrix is also called error matrix is a standard format accuracy of the evaluation, in the form of a matrix with n rows and n columns is expressed.
After reading the confusion matrix of TN, TP, FN, FP, and the recall rate, precision of expression, a bit confused. The number of sheets with reference to FIG confusion matrix, making an "icon:
Note:
-
The comparison of the predicted and the real situation, the sample distribution to all four quadrants of the (present When the categories, there is confusion matrix quadrants composition);
-
The name of each quadrant, such as the TP, represents TruePositive, True indicates the prediction result is correct, the prediction indicates Positive sample is a positive example, as shown below:
-
Refers to the respective ratios are correctly predicted case ( green shading part), accounting for the row / column .
-
Regardless of several categories confusion matrix, only the diagonal is correct (consistent with the actual predictions, simply referred to as only diagonal green )
recall/precision tradeoff
When the recall and precision should have taken the maximum value, the best performance. But both have a trade-off phenomenon, so the introduction of harmonic mean (harmonic mean)
:
Compared to arithmetic mean, harmonic mean may be a larger weight to a lower value.
- FIG apparent three curves intersect at the same point