Evaluation finishing machine learning

table of Contents

1. accuracy (Accuracy)

2. Recall (Recall)

3. The exact ratio (Precision)

4. Relationship between recall and precision rate

The false alarm rate (the FPR) and false negative rate (the FNR)

 

1. accuracy (Accuracy)

Accuracy rate refers to the proportion of our model predicted the correct result occupied.

The official point that the definition of accuracy as follows:

$Accuracy = \frac{Number of correct predictions}{Total number of predictions}$

For binary classification accuracy can be calculated as follows according to the positive and negative categories Category: 

$Accuracy = \frac{TP+TN}{TP+TN+FP+FN}$

Where, TP = true positives, TN = true negative cases, FP = false positive cases, FN = false negative cases. 

For example: The model is divided into stream 100 Tor (n-type) or no-Tor (negative category):

 

 $Accuracy = \frac{TP+TN}{TP+TN+FP+FN}= \frac{1+90}{1+90+1+8}=0.91$

 

Accuracy was 0.91, i.e. 91% (a total of 100 samples with 91 correctly predicted).

However, carefully pondering the proportion of positive and negative example, it is clearly not enough telling. For example, I have 1000 samples, of which 910 cases were negative, as long as the model would predict learn all samples negative cases, the accuracy rate can reach 91%, but never like this can not be detected positive cases.

So, when using unbalanced classification data sets (such as the presence of significant difference between the number of positive and negative category labels category labels), an accuracy rate alone does not reflect the overall situation.

In part 3, we will introduce two are better able to assess the classification imbalance indicators: recall and precision rate.

 

2. Recall (Recall = TPR)


Recall indicates all categories positive samples were correctly identified as positive ratio category.

Mathematically, the definition of the recall are as follows:

$Recall=\frac{TP}{TP+FN}$ 

Let's calculate the recall flow classifier (example above):

$Recall=\frac{TP}{TP+FN} = \frac{1}{1+8} = 0.11$  

 

Recall of the model is 0.11, that is to say, the model can correctly identify the percentage of all Tor traffic is 11%. 

 

3. The exact ratio (Precision)

Accuracy rate indicates the ratio of a positive sample categories, indeed class is identified as positive.

Accuracy rate defined as follows:

$Precision=\frac{TP}{TP+FN}$ 

Let's calculate the precise rate of flow classifier (example above) are:

$Precision=\frac{TP}{TP+FN} =\frac{1}{1+1} = 0.5$  

The exact model of 0.5, i.e., the model accuracy in predicting traffic Tor is 50%. 

Reference: https:? //Developers.google.com/machine-learning/crash-course/classification/precision-and-recall hl = zh-cn

 

4. Relationship between recall and precision rate 

 

 

In the field of information retrieval, recall and precision rate is also known as recall and precision :

  • Related recall ratio = amount of information related to the retrieved information / System 
  • = Total precision information retrieved relevant information / retrieved

It can be understood:

  • False negative cases (FN), also known as false negatives
  • False positive cases (FP), also known as false positives

Reference: Machine Learning Performance Evaluation Index

The false alarm rate (the FPR) and false negative rate (the FNR) 

Example real rate TPR = TP / (TP + TN)

He said to be singled out (forecasts are "positive"), and correct (predictive value = true value) of the total predicted the correct ratio. 

Anyway embodiment of FPR = FP / (FP + TN)

He said to be singled out (forecasts are "positive"), but wrong (predictive value! = True value) of the total forecast error ratio.

TPR is larger, the more likely it singled out (is correct); FPR is larger, the more impossible (during the selection process, and then pick out the new, that is believed to be correct and then pick out the more You may pick the wrong).

TNR (True Negative Rate) can be understood as all anti-class, there is predicted to be a like number (anti-class prediction is correct), given defined as follows:

\large TNR=\frac{TN}{FP+TN}

FNR(False Negative Rate)可以理解为所有正类中,有多少被预测成反类(反类预测错误),给出定义如下:

\large FNR=\frac{FN}{TP+FN}

误报率(FPR)、漏报率(FNR)

Guess you like

Origin www.cnblogs.com/shona/p/12239400.html