Consider that 20 stories of Author X and 10 stories of Author Y were kept together without mentioning the names of the authors. A classifier was then asked to predict the author (X or Y) of each of these stories. Let, out of X's stories, 6 were classified as that of Y. On the other hand, out of Y's stories, 2 were classified as that of X.
Considering X and Y as two classes, which of the following statements is/are true?
Show Hint
Build the 2x2 confusion matrix from the story counts first (14, 6, 2, 8), then compute accuracy, precision per class, and recall per class from it.
Precision of Class X is higher than the Precision of Class Y.
Recall of Class X is higher than the Recall of Class Y.
Accuracy of the classifier is 14/15.
Show Solution
Verified By Collegedunia
The Correct Option isA, B
Solution and Explanation
Step 1: Build the confusion matrix from the given numbers. There are 20 stories by X and 10 by Y, 30 in total. Out of X's 20 stories, 6 are wrongly called Y, so \(20-6=14\) are correctly called X. Out of Y's 10 stories, 2 are wrongly called X, so \(10-2=8\) are correctly called Y.
Predicted X
Predicted Y
Actual X (20 stories)
14
6
Actual Y (10 stories)
2
8
Step 2: Compute the overall accuracy. Accuracy is the fraction of all stories correctly classified: \[ \text{Accuracy} = \frac{14 + 8}{30} = \frac{22}{30} = \frac{11}{15} \] This matches statement (A), so (A) is true, and it also rules out statement (D), which claims 14/15.
Step 3: Compute Precision for class X and class Y. Precision of a class is (correctly predicted as that class) divided by (all stories predicted as that class). For X: predicted X totals \(14 + 2 = 16\) (the 14 correct plus the 2 Y stories wrongly called X), so \[ \text{Precision}_X = \frac{14}{16} = 0.875 \] For Y: predicted Y totals \(8 + 6 = 14\) (the 8 correct plus the 6 X stories wrongly called Y), so \[ \text{Precision}_Y = \frac{8}{14} \approx 0.571 \] Since \(0.875 > 0.571\), Precision of X is indeed higher than Precision of Y, so statement (B) is true.
Step 4: Compute Recall for class X and class Y. Recall of a class is (correctly predicted as that class) divided by (all stories that actually belong to that class). \[ \text{Recall}_X = \frac{14}{20} = 0.7, \qquad \text{Recall}_Y = \frac{8}{10} = 0.8 \] Here Recall of X (0.7) is lower than Recall of Y (0.8), not higher, so statement (C) is false.
Final Answer: Statements (A) and (B) are true; (C) and (D) are false.\[ \boxed{\text{(A) and (B)}} \]
Was this answer helpful?
0
0
Top GATE DA Data Science and Artificial Intelligence Questions