Confusion matrix - the sensitivity and specificity of understanding

Creative Commons License Copyright: Attribution, allow others to create paper-based, and must distribute paper (based on the original license agreement with the same license Creative Commons )

Confusion matrix - understand the sensitivity and specificity

definition

spirit Min degree S e n s i t i v i t Y = T P T P + F N Sensitivity Sensitivity = \ frac {TP} {TP + FN}
S p e c i f i c i t y = T N T N + F P Specificity Specificity = \ frac {TN} {TN + FP}

Case

Assuming that a total of 100,000 patients, among them suffering from cancer of 200 people, or 0.2 percent prevalence rate, the actual test results are as follows:

A positive test Test negative total
The actual positive 160 40 200
The actual negative 29940 69860 99800
total 30100 69900 1000000

Based on the above data:
S e n s i t i v i t y = T P T P + F N = 160 160 + 400 = 80.0 % Sensitivity Sensitivity = \ frac {TP} {TP + FN} = \ frac {160} {160 + 400} = 80.0 \%
S p e c i f i c i t y = T N T N + F P = 69860 69860 + 29940 = 70.0 % Specificity Specificity = \ frac {TN} {TN + FP} = \ frac {69860} {69860 + 29940} = 70.0 \%

Namely:
sensitivity (also known as the recall) represents the actual number of cases detected in the proportion of the total number of cases reached 80%, the proportion of patients that can detect real out
specifically indicates that the test without sick people, determining exclude 70% probability of illness, will have 30% chance of being tested positive, but not actually sick. That can not be detected proportion of real illness.

Here Insert Picture Description
Better model, so that all samples can be distributed in four quadrants proportion more optimized to enhance the sensitivity and specificity, increasing the proportion of the sample positive diagonal, i.e. improved detection.

Here Insert Picture Description

ROC curve

Here Insert Picture Description

Guess you like

Origin blog.csdn.net/houhuipeng/article/details/92759390