当前位置:网站首页>An in-depth understanding of fp/fn/precision/recall

An in-depth understanding of fp/fn/precision/recall

2022-07-07 21:38:00 Beauty of algorithm and programming

 Insert picture description here
Because the picture is large , It is recommended to right-click to open a new window for easy reading !

(1) TP and TN It's easy to understand , However FP and FN Easy to confuse ;

  • FP(False Positive) Indicates the positive example of error, that is, the negative example in the sample is incorrectly recognized as a positive example , Like the picture on the right 3、4 The line is shown by a red square ;
  • FN(False Negative) Negative examples that indicate errors, that is, the positive examples in the sample are incorrectly recognized as negative examples , Like the picture on the right 1、2 Line red triangle ;

(2) About the evaluation index ,Accuracy It's easy to understand , However Precision and Recall It's especially confusing ;

  • Precision It aims at the proportion after detection , After model checking ( Right picture ), All positive examples detected include correct positive examples and wrong positive examples , Compared with the original sample , Whether it is the correct positive example or the wrong positive example , The test results are positive , Therefore, the test results are , The total number of positive examples is (TP+FP), So in these positive examples , How many are the correct positive examples ? The answer is TP/(TP+FP);FP The smaller it is , be Precision The bigger it is , and FP That is, the number of false positives ; therefore ,Precision It reflects the positive and false positives in the sample .
  • Recall It aims at the proportion before detection , In the original sample ( On the left ), How many positive examples are really detected by the model ?TP That is, the number of positive cases detected , How many positive examples are there in the original sample ? The answer is the number of positive cases detected plus the number of positive cases not detected ; The number of positive cases that have not been detected is the number of positive cases that were originally detected as negative cases by the model , Like the picture on the right 1、2 The red triangle of the line shows , It is a negative example of error (FP); so Recall=TP/(TP+FN);FN The smaller it is , be Recall The bigger it is , and FN That is, the number of positive cases of missed detection ; therefore Recall It reflects the omission of positive cases in the sample .
原网站

版权声明
本文为[Beauty of algorithm and programming]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071714156139.html