1.

Define the confusion matrix?

Answer»

It is a matrix that has 2 rows and 2 columns. It has 4 outputs that a binary classifier provides to it. It is USED to derive various MEASURES like specificity, error rate, accuracy, precision, sensitivity, and recall.

The TEST data set should contain the correct and predicted labels. The labels depend upon the performance. For instance, the predicted labels are the same if the binary classifier performs perfectly. Also, they MATCH the part of observed labels in real-world scenarios. The four outcomes shown above in the confusion matrix mean the following:

  1. True Positive: This means that the positive prediction is correct.
  2. False Positive: This means that the positive prediction is incorrect.
  3. True Negative: This means that the negative prediction is correct.
  4. False Negative: This means that the negative prediction is incorrect.

The formulas for CALCULATING basic measures that comes from the confusion matrix are:

  1. Error rate: (FP + FN)/(P + N)
  2. Accuracy: (TP + TN)/(P + N)
  3. Sensitivity = TP/P
  4. Specificity = TN/N
  5. Precision = TP/(TP + FP)
  6. F-Score  = (1 + b)(PREC.REC)/(b2 PREC + REC) Here, b is mostly 0.5 or 1 or 2.

In these formulas:

FP = false positive
FN = false negative
TP = true positive
RN = true negative

Also,

Sensitivity is the measure of the True Positive Rate. It is also called recall.
Specificity is the measure of the true negative rate.
Precision is the measure of a positive predicted value.
F-score is the harmonic mean of precision and recall.



Discussion

No Comment Found