1. Confusion Matrix
is a confusion matrix of two types of problems in which the output uses a different category label
Commonly used metrics to measure classification performance are:
- The correct rate (Precision), which is equal to tp/(TP+FP), gives the ratio of the true positive example in the sample that is predicted to be a positive example.
- recall Rate (Recall), which he equals to tp/(TP+FN), gives the true positive example of the predicted positive example as the proportion of all true positive cases.
2. ROC curve
The horizontal axis in the figure is the proportion of pseudo positive example (=fp/(FP+TN)), and the vertical is the ratio of the true example (Zhenyang rate =tp/(TP+FN)). The ROC curve gives the change of the false positive rate and Zhenyang rate when the threshold value changes. The point in the lower-left corner corresponds to the case where all samples are judged as counter-cases, and the point in the upper-right corner corresponds to the case where all samples are judged as positive cases. The dashed line gives the result curve of the random guess.
One indicator for comparing the different ROC curves is the area under the curve (Areas unser the Curve). The AUC gives the average performance value of the classifier, and of course it does not completely replace the observation of the whole curve. The AUC for a perfect classifier is 1.0, while the AUC with random guesses is 0.5.
The END.
Machine learning Practical Note (Python implementation) -07-classification performance metrics