Quiz Space

September 2022 term · Machine Learning Techniques · BSCS2007

MLT End Term: 11 December 2022, Set ETD1 (September 2022 term)

The IIT Madras BS Machine Learning Techniques (MLT) End Term paper sat on 11 Dec 2022, in the September 2022 term, set ETD1: 30 questions for 100 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
30
Marks
100
Duration
180 min
MCQ
12
MSQ
3
Numerical
15

Updated

Official paper: IIT M DIPLOMA AN1 EXAM ETD1 11 Dec 2022 · No negative marking.

Question 1

+3 marksOne correct option

What will be the result of applying ReLU to the following values?:
-2.7, 3.9, -1.0, 4.2, 6.4, -7.3

  1. A

    1, 3.9, 1, 4.2, 6.4, 1

  2. B

    0, 1, 0, 1, 1, 0

  3. C

    -2.7, 0, -1.0, 0, 0, -7.3

  4. D

    -1, +1, -1, +1, +1, -1

  5. E

    0, 3.9, 0, 4.2, 6.4, 0

Show answer

Correct answer

  • E

    0, 3.9, 0, 4.2, 6.4, 0

Question 2

+3 marksOne correct option

Suppose you run gradient descent for linear regression for 500 iterations with a learning rate 0.02. You observe that the training loss (sum of squared loss) is increasing after every iteration. What may be the reason? What changes would you make to the set-up for the gradient descent to converge to a solution?

  1. A

    Number of features in the training data may be too low, try increasing them.

  2. B

    Number of features in the training data may be too high, try reducing them.

  3. C

    Learning rate may be too low; Try increasing it.

  4. D

    Learning rate may be too high; Try reducing it.

Show answer

Correct answer

  • D

    Learning rate may be too high; Try reducing it.

Question 3

+4 marksOne correct option
  1. A

    Only dataset-1

  2. B

    Only dataset-2

  3. C

    On both dataset-1 and dataset-2

  4. D

    Neither dataset-1 nor dataset-2

Show answer

Correct answer

  • C

    On both dataset-1 and dataset-2

Question 4

+4 marksOne correct option
  1. A

    Yes

  2. B

    No

Show answer

Correct answer

  • A

    Yes

Question 5

+4 marksOne correct option

A set of data points is generated by the following process:

yi=w0+w1xi+w2xi2+w3xi3+w4xi4+w5xi5+ϵy_i = w_0 + w_1x_i + w_2x_i^2 + w_3x_i^3 + w_4x_i^4 + w_5x_i^5 + \epsilon where ϵ\epsilon is a Gaussian noise.

You use two models to fit the data:

Model 1: y^=a0+a1x+a2x2\hat{y} = a_0 + a_1x + a_2x^2

Model 2: y^=a0+a1x+a2x2+a3x3+…+a10x10\hat{y} = a_0 + a_1x + a_2x^2 + a_3x^3 + \ldots + a_{10}x^{10}

Using a fixed number of training examples, Model 2 will have __________ bias than Model 1, and Model 1 is more likely to __________

  1. A

    Higher, underfit

  2. B

    Lower, overfit

  3. C

    Higher, overfit

  4. D

    Lower, underfit

Show answer

Correct answer

  • D

    Lower, underfit

Question 6

+5 marksOne correct option

Consider the following linearly separable training dataset for a binary classification problem in R2\mathbb{R}^2 :

x1=[0−1],y1=1x2=[−23],y2=1\mathbf{x_1} = \begin{bmatrix} 0 \\ -1 \end{bmatrix}, y_1 = 1 \qquad \mathbf{x_2} = \begin{bmatrix} -2 \\ 3 \end{bmatrix}, y_2 = 1

x3=[01],y3=−1x4=[1−1],y4=−1\mathbf{x_3} = \begin{bmatrix} 0 \\ 1 \end{bmatrix}, y_3 = -1 \qquad \mathbf{x_4} = \begin{bmatrix} 1 \\ -1 \end{bmatrix}, y_4 = -1

A hard-margin, linear-SVM is trained on this dataset. Among the four options given below, one of them is the optimal weight vector w∗\mathbf{w}^*. Identify this vector. Recall that the optimal weight vector is the solution to the primal problem.

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

Correct answer

  • A

Question 7

+5 marksOne correct option

Consider the following data set:

Which of the following will have lower leave-one-out cross-validation error?

  1. A

    1-Nearest Neighbor

  2. B

    3-Nearest Neighbor

Show answer

Correct answer

  • B

    3-Nearest Neighbor

Question 8

+6 marksOne correct option

Consider that we introduce negative marking in this exam. After getting the results, you observe that eight of your friends {f1,…,f8}\{f_1, \ldots, f_8\} have scored the following marks respectively:

{5, 6, -2, -3, 1, 7, -4, -1}

You want to cluster your friends into two groups based on their marks by using the Lloyd's algorithm.

You initialize the algorithm by keeping the first four friends, i.e., {f1,f2,f3,f4}\{f_1, f_2, f_3, f_4\} in cluster 1 (C1C_1) and the last four friends, i.e., {f5,f6,f7,f8}\{f_5, f_6, f_7, f_8\} in cluster 2 (C2C_2).

How would the clusters look like after executing one step of Lloyd's algorithm?

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

Correct answer

  • D

Question 9

+5 marksOne or more correct options

Select all that apply.

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

Correct answers

  • A
  • D

Question 10

+2 marksOne or more correct options

Which of the following estimators are more likely to be preferred for bagging? Select all that apply.

Select all that apply.

  1. A

    A decision stump

  2. B

    A decision stump with randomly selected features for splitting the nodes

  3. C

    k -NN classifier with a smaller value of k.

  4. D

    k-NN classifier with a larger value of k .

  5. E

    A fully grown decision tree with randomly selected features for splitting the nodes

Show answer

Correct answers

  • C

    k -NN classifier with a smaller value of k.

  • E

    A fully grown decision tree with randomly selected features for splitting the nodes

Question 11

+5 marksNumerical answer
Show answer

Correct answer: 40

Question 12

+5 marksNumerical answer
Show answer

Correct answer: 16

Question 13

+4 marksNumerical answer

Consider a neural network with 8 inputs and 2 outputs. If there are 4 hidden layers each with 4 neurons, how many parameters need to be learnt if there is a bias associated with each neuron in the hidden and output layers?

Show answer

Correct answer: 106

Question 14

+2.5 marksOne correct option

Based on the above data, answer the given subquestions.

Which of the two models is more likely to fit the training data better?

  1. A

    Model 1

  2. B

    Model 2

  3. C

    Both will fit equally well

  4. D

    Can not say

Show answer

Correct answer

  • B

    Model 2

Question 15

+2.5 marksOne correct option

Based on the above data, answer the given subquestions.

Which model is more likely to give less test error?

  1. A

    Model 1

  2. B

    Model 2

  3. C

    It will depend upon the underlying distribution that generates the dataset and therefore, can not say.

  4. D

    Both will give the equal error

Show answer

Correct answer

  • C

    It will depend upon the underlying distribution that generates the dataset and therefore, can not say.

Question 16

+3 marksNumerical answer

Upon performing standard PCA on a centered dataset in R3\mathbb{R}^3, we get the principal components to be:

w1=[100]T,w2=[010]T,w3=[001]T\mathbf{w}_1 = \begin{bmatrix} 1 & 0 & 0 \end{bmatrix}^T, \quad \mathbf{w}_2 = \begin{bmatrix} 0 & 1 & 0 \end{bmatrix}^T, \quad \mathbf{w}_3 = \begin{bmatrix} 0 & 0 & 1 \end{bmatrix}^T

C\mathbf{C} is the covariance matrix of the centered dataset. The off-diagonal entries are hidden from your view:

C=[12aba6cbc3]\mathbf{C} = \begin{bmatrix} 12 & a & b \\ a & 6 & c \\ b & c & 3 \end{bmatrix}

[x1x2x3]T\begin{bmatrix} x_1 & x_2 & x_3 \end{bmatrix}^T denotes a data-point. Here, x1,x2,x3x_1, x_2, x_3 are the three features.

Note: The word standard indicates that no kernel has been used.

Based on the above data, answer the given subquestions.

What is the variance along the first principal component?

Show answer

Correct answer: 12

Question 17

+3 marksOne correct option

Upon performing standard PCA on a centered dataset in R3\mathbb{R}^3, we get the principal components to be:

w1=[100]T,w2=[010]T,w3=[001]T\mathbf{w}_1 = \begin{bmatrix} 1 & 0 & 0 \end{bmatrix}^T, \quad \mathbf{w}_2 = \begin{bmatrix} 0 & 1 & 0 \end{bmatrix}^T, \quad \mathbf{w}_3 = \begin{bmatrix} 0 & 0 & 1 \end{bmatrix}^T

C\mathbf{C} is the covariance matrix of the centered dataset. The off-diagonal entries are hidden from your view:

C=[12aba6cbc3]\mathbf{C} = \begin{bmatrix} 12 & a & b \\ a & 6 & c \\ b & c & 3 \end{bmatrix}

[x1x2x3]T\begin{bmatrix} x_1 & x_2 & x_3 \end{bmatrix}^T denotes a data-point. Here, x1,x2,x3x_1, x_2, x_3 are the three features.

Note: The word standard indicates that no kernel has been used.

Based on the above data, answer the given subquestions.

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

Correct answer

  • C

Question 18

+3 marksNumerical answer

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 0

Question 19

+3 marksOne correct option

Based on the above data, answer the given subquestions.

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

Correct answer

  • D

Question 20

+3 marksNumerical answer

Based on the above data, answer the given subquestions.

How many mistakes does your algorithm make?

Show answer

Correct answer: 2

Question 21

+3 marksNumerical answer

Based on the above data, answer the given subquestions.

What is the squared length of the weight vector corresponding to the final linear separator your algorithm outputs?

Show answer

Correct answer: 4

Question 22

+1.5 marksNumerical answer

Based on the above data, answer the given subquestions.

What is the value of a?

Show answer

Correct answer: 2

Question 23

+1.5 marksNumerical answer

Based on the above data, answer the given subquestions.

What is the value of b?

Show answer

Correct answer: 2

Question 24

+1.5 marksNumerical answer

Based on the above data, answer the given subquestions.

What is the value of c?

Show answer

Correct answer: 4

Question 25

+2.5 marksNumerical answer

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 2

Question 26

+2 marksNumerical answer

Consider a single iteration of the AdaBoost algorithm that was run on three sample points, starting with uniform weights on the sample points. The labels are either +1 or −1. In the table below, some values have been omitted.

Data pointTrue labelPredicted labelInitial weightUpdated weight
x1\mathbf{x}_1?113\frac{1}{3}12\frac{1}{2}
x2\mathbf{x}_2−1-1−1-113\frac{1}{3}?
x3\mathbf{x}_3−1-1?13\frac{1}{3}14\frac{1}{4}

Based on the above data, answer the given subquestions.

What will be the true label for point x1 ? Enter 1 or -1 .

Show answer

Correct answer: -1

Question 27

+2 marksNumerical answer

Consider a single iteration of the AdaBoost algorithm that was run on three sample points, starting with uniform weights on the sample points. The labels are either +1 or −1. In the table below, some values have been omitted.

Data pointTrue labelPredicted labelInitial weightUpdated weight
x1\mathbf{x}_1?113\frac{1}{3}12\frac{1}{2}
x2\mathbf{x}_2−1-1−1-113\frac{1}{3}?
x3\mathbf{x}_3−1-1?13\frac{1}{3}14\frac{1}{4}

Based on the above data, answer the given subquestions.

What will be the updated weight for point x2 ? Enter your answer correct to two decimal places.

Show answer

Correct answer: 0.25 (accepted within ±0.02)

Question 28

+3 marksNumerical answer

Consider a single iteration of the AdaBoost algorithm that was run on three sample points, starting with uniform weights on the sample points. The labels are either +1 or −1. In the table below, some values have been omitted.

Data pointTrue labelPredicted labelInitial weightUpdated weight
x1\mathbf{x}_1?113\frac{1}{3}12\frac{1}{2}
x2\mathbf{x}_2−1-1−1-113\frac{1}{3}?
x3\mathbf{x}_3−1-1?13\frac{1}{3}14\frac{1}{4}

Based on the above data, answer the given subquestions.

How much training error will be incurred by the first estimator? The training examples consist of given three points. Enter your answer correct to two decimal places.

Show answer

Correct answer: 0.33 (accepted within ±0.02)

Question 29

+4 marksNumerical answer

There are 88 points in a training dataset in R2\mathbb{R}^2 for a binary classification problem that is linearly separable. Use the following notation: x=[x1x2]\mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} for a data-point and w∗=[w1w2]\mathbf{w}^* = \begin{bmatrix} w_1 \\ w_2 \end{bmatrix} for the optimal weight vector of a hard-margin, linear-SVM.

x1x_1x2x_2yy
011
021
111
201
0−1-1−1-1
−2-20−1-1
−3-30−1-1
−5-51−1-1

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 4

Question 30

+4 marksOne or more correct options

There are 88 points in a training dataset in R2\mathbb{R}^2 for a binary classification problem that is linearly separable. Use the following notation: x=[x1x2]\mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} for a data-point and w∗=[w1w2]\mathbf{w}^* = \begin{bmatrix} w_1 \\ w_2 \end{bmatrix} for the optimal weight vector of a hard-margin, linear-SVM.

x1x_1x2x_2yy
011
021
111
201
0−1-1−1-1
−2-20−1-1
−3-30−1-1
−5-51−1-1

Based on the above data, answer the given subquestions.

Select all that apply.

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

Correct answers

  • B
  • C