uiz Space

September 2024 term · Machine Learning Techniques · BSCS2007

Machine Learning Techniques Quiz 2: 1 December 2024 (September 2024 term)

The IIT Madras BS Machine Learning Techniques (MLT) Quiz 2 paper sat on 1 Dec 2024, in the September 2024 term: 15 questions for 50 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
15
Marks
50
Duration
120 min
MCQ
5
Numerical
8
MSQ
2

Updated

Official paper: IIT M DIPLOMA AN EXAM QDD2 01 Dec 2024 · No negative marking.

Question 1

+3 marksOne correct option

Kernel regression with a polynomial kernel is applied on the following dataset with two features:

X=[100010],y=[2,1,2]TX = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix}, \qquad y = [2, 1, 2]^T

Weight vector can be written as w=ϕ(X)αw = \phi(X)\alpha, where ϕ\phi is the transformation mapping corresponding to the kernel k(xi,xj)=(1+xiTxj)2k(x_i, x_j) = (1 + x_i^T x_j)^2. The vector α\alpha is given by (K)−1y(K)^{-1}y, where KK is the kernel matrix.

Based on the above data, answer the given subquestions.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 2

+4 marksNumerical answer

Kernel regression with a polynomial kernel is applied on the following dataset with two features:

X=[100010],y=[2,1,2]TX = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix}, \qquad y = [2, 1, 2]^T

Weight vector can be written as w=ϕ(X)αw = \phi(X)\alpha, where ϕ\phi is the transformation mapping corresponding to the kernel k(xi,xj)=(1+xiTxj)2k(x_i, x_j) = (1 + x_i^T x_j)^2. The vector α\alpha is given by (K)−1y(K)^{-1}y, where KK is the kernel matrix.

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 2.33 (accepted within ±0.02)

Question 3

+4 marksNumerical answer

A binary classification dataset has 2000 data points belonging to {0,1}2\{0,1\}^2. A Naive Bayes algorithm was run on the same dataset, resulting in the following estimates:

p^, estimate for P(y=1)=0.4p^10, estimate for P(f1=1∣y=0)=0.25p^20, estimate for P(f2=1∣y=0)=0.35p^11, estimate for P(f1=1∣y=1)=0.15p^21, estimate for P(f2=1∣y=1)=0.05\begin{aligned} \hat{p}, &\text{ estimate for } P(y = 1) = 0.4 \\ \hat{p}_1^0, &\text{ estimate for } P(f_1 = 1 \mid y = 0) = 0.25 \\ \hat{p}_2^0, &\text{ estimate for } P(f_2 = 1 \mid y = 0) = 0.35 \\ \hat{p}_1^1, &\text{ estimate for } P(f_1 = 1 \mid y = 1) = 0.15 \\ \hat{p}_2^1, &\text{ estimate for } P(f_2 = 1 \mid y = 1) = 0.05 \end{aligned}

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 0.95 (accepted within ±0.01)

Question 4

+3 marksNumerical answer

A binary classification dataset has 2000 data points belonging to {0,1}2\{0,1\}^2. A Naive Bayes algorithm was run on the same dataset, resulting in the following estimates:

p^, estimate for P(y=1)=0.4p^10, estimate for P(f1=1∣y=0)=0.25p^20, estimate for P(f2=1∣y=0)=0.35p^11, estimate for P(f1=1∣y=1)=0.15p^21, estimate for P(f2=1∣y=1)=0.05\begin{aligned} \hat{p}, &\text{ estimate for } P(y = 1) = 0.4 \\ \hat{p}_1^0, &\text{ estimate for } P(f_1 = 1 \mid y = 0) = 0.25 \\ \hat{p}_2^0, &\text{ estimate for } P(f_2 = 1 \mid y = 0) = 0.35 \\ \hat{p}_1^1, &\text{ estimate for } P(f_1 = 1 \mid y = 1) = 0.15 \\ \hat{p}_2^1, &\text{ estimate for } P(f_2 = 1 \mid y = 1) = 0.05 \end{aligned}

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 0

Question 5

+4 marksNumerical answer
Show answer

Correct answer: 2

Question 6

+4 marksNumerical answer

Consider the following feature vectors in R3\mathbb{R}^3:

x1=[123],x2=[−1−20],x3=[301],x4=[014],x5=[2−1−3]x_1 = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}, \quad x_2 = \begin{bmatrix} -1 \\ -2 \\ 0 \end{bmatrix}, \quad x_3 = \begin{bmatrix} 3 \\ 0 \\ 1 \end{bmatrix}, \quad x_4 = \begin{bmatrix} 0 \\ 1 \\ 4 \end{bmatrix}, \quad x_5 = \begin{bmatrix} 2 \\ -1 \\ -3 \end{bmatrix}

The labels of these points are:

y1=0,y2=1,y3=1,y4=0,y5=1y_1 = 0, \quad y_2 = 1, \quad y_3 = 1, \quad y_4 = 0, \quad y_5 = 1

If we use a kk-NN algorithm with k=3k = 3, what would be the predicted label for the following test point:

xtest=[112]x_{test} = \begin{bmatrix} 1 \\ 1 \\ 2 \end{bmatrix}

Show answer

Correct answer: 0

Question 7

+4 marksNumerical answer

Suppose you want to use a Naive Bayes classifier to predict whether a student will pass or fail an exam based on two features: the number of hours they studied and whether they attended review sessions. Assume that the features are conditionally independent given the exam outcome and that the variances of the study hours distributions are equal for both pass and fail categories. How many parameters are required to classify a new student using this Naive Bayes classifier?

Show answer

Correct answer: 6

Question 8

+4 marksOne or more correct options

Select all true statements.

Select all that apply.

  1. A
  2. B
  3. C
  4. D
  5. E
Show answer

Correct answers

  • A
  • D
  • E

Question 9

+3 marksNumerical answer

Consider a binary classification problem with a training dataset of 100 points, evenly distributed between two classes (50 points in each class). You decide to train a k-NN algorithm with k = 3. Each point is considered its own neighbor during classification.
Based on the above data, answer the given subquestions.

What is the minimum number of misclassifications that can occur in the training dataset when using this k-NN algorithm?

Show answer

Correct answer: 0

Question 10

+2 marksOne correct option

Consider a binary classification problem with a training dataset of 100 points, evenly distributed between two classes (50 points in each class). You decide to train a k-NN algorithm with k = 3. Each point is considered its own neighbor during classification.
Based on the above data, answer the given subquestions.

Assuming there are outliers, the decision boundary becomes smoother with decreasing value of k in a k-NN algorithm.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 11

+2 marksOne correct option

Based on the above data, answer the given subquestions.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 12

+4 marksOne correct option

Based on the above data, answer the given subquestions.

Consider the Bayesian formulation of the linear regression problem, where the prior for ww is assumed to be

w∼Laplace(0,2/λ).w \sim \text{Laplace}(0, 2/\lambda).

Then, which among the following is true?

Hint: If X∼Laplace(μ,b)X \sim \text{Laplace}(\mu, b), then

fX(x)=12be−∣x−μ∣/b.f_X(x) = \frac{1}{2b} e^{-|x-\mu|/b}.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 13

+2 marksOne correct option

Consider a binary classification problem in which a decision tree is classifying data points into two classes, A and B. In a particular node of the tree, 60% of the data points belong to class A, while the remaining 40% belong to class B.
Based on the above data, answer the given subquestions.

Do you have enough information to find the entropy of this node?

  1. A

    Yes

  2. B

    No

Show answer

Correct answer

  • A

    Yes

Question 14

+4 marksNumerical answer

Consider a binary classification problem in which a decision tree is classifying data points into two classes, A and B. In a particular node of the tree, 60% of the data points belong to class A, while the remaining 40% belong to class B.
Based on the above data, answer the given subquestions.

If the answer to the previous question is ”Yes,” calculate the entropy of this node to three decimal places. If the answer to the previous question is ”No,” enter -1 as your answer.

Show answer

Correct answer: 0.975 (accepted within ±0.035)

Question 15

+3 marksOne or more correct options

Select all that apply.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answers

  • A
  • C