Classification · Machine Learning
11 questions · asked in 3 of 3 years (2024–2026)
MCQ 4 · MSQ 4 · NAT 31-mark 5 · 2-mark 6
2024Questions per year2026
Questions 1–5 of 11
Consider that stories of Author and stories of Author were kept together without mentioning the names of the authors. classifier was then asked to predict the author of each of these stories. Let, out of 's stories, were classified as that of . On the other hand, out of 's stories, were classified as that of .
Considering and as two classes, which of the following statements is/are true?
Considering and as two classes, which of the following statements is/are true?
One or more options are correct.
Answer: (A), (B)
Make the confusion matrix first. Author X has stories, and of them were labelled Y, so were labelled correctly as X. Author Y has stories, and of them were labelled X, so were labelled correctly as Y.
Accuracy . So (A) is true and (D), which says , is false.
Precision(X) . The bottom part is all stories predicted as X: correct plus of Y's wrongly labelled X.
Precision(Y) . The bottom part is all stories predicted as Y: correct plus of X's wrongly labelled Y.
Since , (B) is true.
Recall(X) and Recall(Y) . Since , (C) is false.
Answer: (A), (B)
Accuracy . So (A) is true and (D), which says , is false.
Precision(X) . The bottom part is all stories predicted as X: correct plus of Y's wrongly labelled X.
Precision(Y) . The bottom part is all stories predicted as Y: correct plus of X's wrongly labelled Y.
Since , (B) is true.
Recall(X) and Recall(Y) . Since , (C) is false.
Answer: (A), (B)
Consider designing a linear classifier
on a dataset , . Recall that the sign function outputs +1 if the argument is positive, and −1 if the argument is non-positive. The parameters and are updated as per the following training algorithm:
whenever . In other words, whenever the classifier wrongly predicts a sample from the dataset, gets updated to , and likewise gets updated to . Consider the case , . Then
on a dataset , . Recall that the sign function outputs +1 if the argument is positive, and −1 if the argument is non-positive. The parameters and are updated as per the following training algorithm:
whenever . In other words, whenever the classifier wrongly predicts a sample from the dataset, gets updated to , and likewise gets updated to . Consider the case , . Then
Answer: (A)
The case is and , so the point is misclassified and the update is , .
Put the new parameters into :
Since , the added amount is at least . So rises for this point, and (A) is true. That rules out (B) and (C).
(D) is false: here , which is not above .
Answer: (A)
Put the new parameters into :
Since , the added amount is at least . So rises for this point, and (A) is true. That rules out (B) and (C).
(D) is false: here , which is not above .
Answer: (A)
The naive Bayes classifier is used to solve a two-class classification problem with class labels . Suppose the prior probabilities are and . Assuming a discrete feature space with
for a specific feature vector . The probability of misclassifying is _______ (Round off to two decimal places)
for a specific feature vector . The probability of misclassifying is _______ (Round off to two decimal places)
Answer: 0.39 to 0.41
Posteriors: ,
The Bayes-optimal classifier chooses the class with the larger posterior (, with ). Misclassification probability is the probability of the class not chosen:
Answer: 0.40
Consider designing a linear binary classifier on the following training data:
Class-1: , Class-2:
Hard-margin support vector machine (SVM) formulation is solved to obtain and . Which of the following options is/are correct?
Class-1: , Class-2:
Hard-margin support vector machine (SVM) formulation is solved to obtain and . Which of the following options is/are correct?
One or more options are correct.
Answer: (B), (C)
Give Class-1 the label and Class-2 the label . The hard-margin SVM minimises subject to for every point. Let .
Point (0,0), label : , so .
Point (2,0): , so .
Point (0,2): in the same way, .
Point (2,2): .
To make smallest, take as small as allowed. That needs and . So and . The point (2,2) gives , so its constraint also holds.
Values of : (0,0) gives , (2,0) gives , (0,2) gives , (2,2) gives . The first three lie exactly on a margin boundary (value ). The point (2,2) is inside the safe region (value 3), so it is not a support vector. The number of support vectors is 3.
Margin .
Option (A): with and , the point (0,0) gives . It is put in Class-1 and is misclassified (also is violated), so (A) is wrong.
Option (D): the data is linearly separable, so the hard-margin classifier gets all 4 points right. The training accuracy is , not 98%.
Answer: (B), (C)
Point (0,0), label : , so .
Point (2,0): , so .
Point (0,2): in the same way, .
Point (2,2): .
To make smallest, take as small as allowed. That needs and . So and . The point (2,2) gives , so its constraint also holds.
Values of : (0,0) gives , (2,0) gives , (0,2) gives , (2,2) gives . The first three lie exactly on a margin boundary (value ). The point (2,2) is inside the safe region (value 3), so it is not a support vector. The number of support vectors is 3.
Margin .
Option (A): with and , the point (0,0) gives . It is put in Class-1 and is misclassified (also is violated), so (A) is wrong.
Option (D): the data is linearly separable, so the hard-margin classifier gets all 4 points right. The training accuracy is , not 98%.
Answer: (B), (C)
Consider a two-class problem in with class labels red and green. Let and be the means of the two classes. Given test sample , a classifier calculates the squared Euclidean distance (denoted by ) between and the means of the two classes and assigns the class label that the sample is closest to. That is, the classifier computes
and assigns the label red to if , and green otherwise. Which of the following statements is/are correct?
and assigns the label red to if , and green otherwise. Which of the following statements is/are correct?
One or more options are correct.
Answer: (B), (C)
Expand the squared distances, with :
The terms cancel, so is a linear function of (plus a constant). It has the form with
Both depend only on the class means. So (B) and (C) are true, and (D) is false because there is no quadratic term.
For (A): . If , then , and the rule gives the label red, not green. So (A) is false.
Answer: (B), (C)
The terms cancel, so is a linear function of (plus a constant). It has the form with
Both depend only on the class means. So (B) and (C) are true, and (D) is false because there is no quadratic term.
For (A): . If , then , and the rule gives the label red, not green. So (A) is false.
Answer: (B), (C)
Keep practising