| 1. |
Take a look at the confusion matrix:The Confusion MatrixRealityPredictionYesYesNoTrue Positive (TP)False Positive (FP)NoFalse Negative (FN)True Negative (TN)How do you calculate F1 score? |
|
Answer» We begin the calculation by first using the formula to calculate Precision Precision is defined as the percentage of true positive cases versus all the cases where the prediction is true. That is, it takes into account the True Positives and False Positives. Precision = \(\cfrac{ \,}{\, \,}\) x 100% Precision = \(\cfrac{TP}{TP+FP}\) x 100% Next, we calculate recall as the fraction of positive cases that are correctly identified. Recall = \(\cfrac{ \,}{ \,+\, }\) Recall = \(\cfrac{TP}{TP+FN}\) Finally, we calculate the F1 score as the measure of balance between precision and recall. F1 score = 2 × \(\cfrac{ \times }{ +}\) |
|