Quiz Space

September 2023 term · Machine Learning Techniques · BSCS2007

MLT End Term: 24 December 2023, Set ADD3 (September 2023 term)

The IIT Madras BS Machine Learning Techniques (MLT) End Term paper sat on 24 Dec 2023, in the September 2023 term, set ADD3: 19 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
19
Marks
100
Duration
180 min
MSQ
9
MCQ
4
Numerical
6

Updated

Official paper: IIT M DEGREE FN EXAM FDB1 24 Dec 2023 · No negative marking.

Question 1

+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 2

+5 marksOne correct option

Based on the above data, answer the given subquestions.

Suppose the team applies linear PCA on the dataset and reconstructs the data points with zero error using k principal components (directions). For which value of k the reconstruction error would become zero?

  1. A

    1

  2. B

    2

  3. C

    3

  4. D

    4

  5. E

    10

  6. F

    100

Show answer

Correct answer

  • D

    4

Question 3

+6 marksOne or more correct options

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

  • A
  • B

Question 4

+5 marksOne or more correct options

Consider Lloyd’s algorithm used for k-means clustering and choose the correct statements:

Select all that apply.

  1. A

    K-means algorithm may get stuck at local minima.

  2. B

    It guarantees finding the optimal clustering(global minima) in every run.

  3. C

    If the resources are limited and the data set is huge, it will be good to prefer K- means over K-means++.

  4. D

    In practice, k should be as large as possible.

Show answer

Correct answers

  • A

    K-means algorithm may get stuck at local minima.

  • C

    If the resources are limited and the data set is huge, it will be good to prefer K- means over K-means++.

Question 5

+6 marksNumerical answer

We wish to fit a GMM with K=2K = 2 for a dataset having 4 points. At the beginning of the ttht^{th} time step of the EM algorithm, we have θ(t)\theta^{(t)} as follows:

π1=0.4,π2=0.6μ1=2,σ12=1μ2=3,σ22=1\begin{gathered} \pi_1 = 0.4, \pi_2 = 0.6 \\ \mu_1 = 2, \sigma_1^2 = 1 \\ \mu_2 = 3, \sigma_2^2 = 1 \end{gathered}

The density of the points given a particular mixture is given to you for all four points. ff is the density of a Gaussian.

xix_if(xi∣zi=1)f(x_i \vert z_i = 1)f(xi∣zi=2)f(x_i \vert z_i = 2)
110.2420.2420.0540.054
220.3990.3990.2420.242
330.2420.2420.3990.399
440.0540.0540.2420.242

What is the value of λki\lambda_k^i for i=1i = 1 and k=2k = 2 after the E-step? Enter your answer correct to two decimal places

Show answer

Correct answer: 0.25 (accepted within ±0.03)

Question 6

+6 marksNumerical answer

Consider a linearly independent set of data points

X=[11−1101−111]X = \begin{bmatrix} 1 & 1 & -1 \\ 1 & 0 & 1 \\ -1 & 1 & 1 \end{bmatrix}

and the corresponding label y=[0.50−0.5]y = \begin{bmatrix} 0.5 \\ 0 \\ -0.5 \end{bmatrix}. Suppose we fit the data points using a simple linear regression model that minimizes squared error loss L(w)=∑(wTxi−yi)2L(w) = \sum (w^T x_i - y_i)^2. Compute the value of loss at w=w∗w = w^*, where w∗=(XXT)−1Xyw^* = (XX^T)^{-1}Xy

Show answer

Correct answer: 0

Question 7

+3 marksOne correct option

Consider the following dataset with 3 features and 5 data points:

Feat1\text{Feat}_1Feat2\text{Feat}_2Feat3\text{Feat}_3YY
12310.5
231d1d1
3129.5
445d2d2
554d3d3

(d1,d2,d3∈R)(d_1, d_2, d_3 \in \mathbb{R})

You decide to train a linear regression model on this dataset. After training, you obtain the following weight vector

w=[1.20.52.5]\mathbf{w} = \begin{bmatrix} 1.2 \\ 0.5 \\ 2.5 \end{bmatrix}

Now, you decide to introduce L2 regularization to your model. You train the model again with a regularization parameter (λ)(\lambda) set to 0.5. The new regularized weight vector is:

wregularized=[0.90.41.5]\mathbf{w}_{\text{regularized}} = \begin{bmatrix} 0.9 \\ 0.4 \\ 1.5 \end{bmatrix}

Based on the above data, answer the given subquestions.

  1. A

    7.9

  2. B

    12.2

  3. C

    11.9

  4. D

    None of these

Show answer

Correct answer

  • A

    7.9

Question 8

+3 marksOne correct option

Consider the following dataset with 3 features and 5 data points:

Feat1\text{Feat}_1Feat2\text{Feat}_2Feat3\text{Feat}_3YY
12310.5
231d1d1
3129.5
445d2d2
554d3d3

(d1,d2,d3∈R)(d_1, d_2, d_3 \in \mathbb{R})

You decide to train a linear regression model on this dataset. After training, you obtain the following weight vector

w=[1.20.52.5]\mathbf{w} = \begin{bmatrix} 1.2 \\ 0.5 \\ 2.5 \end{bmatrix}

Now, you decide to introduce L2 regularization to your model. You train the model again with a regularization parameter (λ)(\lambda) set to 0.5. The new regularized weight vector is:

wregularized=[0.90.41.5]\mathbf{w}_{\text{regularized}} = \begin{bmatrix} 0.9 \\ 0.4 \\ 1.5 \end{bmatrix}

Based on the above data, answer the given subquestions.

If you further reduce the regularization parameter (λ) to zero. What would be the new prediction for the target variable?

  1. A

    7.9

  2. B

    12.2

  3. C

    11.9

  4. D

    None of these

Show answer

Correct answer

  • C

    11.9

Question 9

+6 marksNumerical answer
Show answer

Correct answer: 10

Question 10

+5 marksNumerical answer
Show answer

Correct answer: 15

Question 11

+5 marksOne correct option
  1. A

    Yes, it will converge.

  2. B

    No, it will never converge.

  3. C

    Insufficient data

Show answer

Correct answer

  • B

    No, it will never converge.

Question 12

+6 marksNumerical answer

Consider a logistic regression model that has been trained for a binary classification problem on a dataset in R2\mathbb{R}^2. The final weight vector learned by the model is w=[3/25/12]\mathbf{w} = \begin{bmatrix} 3/2 \\ 5/12 \end{bmatrix}. Given a test data point as input to the model, it returns 11 as the predicted label if the probability output by the model is greater than 0.750.75 and 00 otherwise.

What is the predicted label for the test data point x=[02]\mathbf{x} = \begin{bmatrix} 0 \\ 2 \end{bmatrix}? Note that the probability output by a logistic regression model is P(y=1∣x)P(y = 1 \mid \mathbf{x}).

Show answer

Correct answer: 0

Question 13

+6 marksOne or more correct options

Based on the above data, answer the given subquestions.

What is the equation of the decision boundary? Select all options that are correct.

Select all that apply.

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

Correct answers

  • A
  • B
  • C

Question 14

+5 marksNumerical answer

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 5.38 (accepted within ±0.06)

Question 15

+6 marksOne or more correct options

Consider a soft-margin Support Vector Machine (SVM) for a binary classification problem with a dataset in a two-dimensional space. The optimization problem for the soft-margin SVM is formulated as:

Minimize 12∥w∥2+C∑i=1Nξi\text{Minimize } \frac{1}{2}\|\mathbf{w}\|^2 + C\sum_{i=1}^{N} \xi_i

subject to the constraints:

yi(w⋅xi+b)≥1−ξi and ξi≥0 for all iy_i(\mathbf{w} \cdot \mathbf{x}_i + b) \ge 1 - \xi_i \text{ and } \xi_i \ge 0 \text{ for all } i

Where CC is a positive constant.
Which of the following statements about the soft-margin SVM is correct?

Select all that apply.

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

Correct answers

  • A
  • B

Question 16

+6 marksOne or more correct options

Which of the following statements are correct?

Select all that apply.

  1. A

    Underfitting models have high bias and low variance.

  2. B

    Overfitting models have low bias and high variance.

  3. C

    Generally, weak learners in the random forest tend to underfit.

  4. D

    If the performance of each estimator in the bagging algorithm is almost identical, the benefit of using bagging to combine them may be minimal or insignificant.

  5. E

    In random forests, multiple decision trees (estimators) are trained simultaneously, allowing for parallel processing and faster model training.

Show answer

Correct answers

  • A

    Underfitting models have high bias and low variance.

  • B

    Overfitting models have low bias and high variance.

  • D

    If the performance of each estimator in the bagging algorithm is almost identical, the benefit of using bagging to combine them may be minimal or insignificant.

  • E

    In random forests, multiple decision trees (estimators) are trained simultaneously, allowing for parallel processing and faster model training.

Question 17

+5 marksOne or more correct options

Suppose we have trained four different models using the same training set from the dataset DD and recorded the training error. The testing error for each model was also recorded using a separate test set. The recorded values are summarized in the table below

ModelTraining errorTest error
10.21.8
21.01.1
30.50.7
45.96.3

Based on the above information, which of the following statement(s) is/are correct?

Select all that apply.

  1. A

    Model 4 tends to overfit.

  2. B

    Model 4 tends to underfit.

  3. C

    Model 1 tends to underfits.

  4. D

    Model 1 tends to overfits.

Show answer

Correct answers

  • B

    Model 4 tends to underfit.

  • D

    Model 1 tends to overfits.

Question 18

+5 marksOne or more correct options

Select all that apply.

  1. A
  2. B
  3. C
Show answer

Correct answers

  • B
  • C

Question 19

+6 marksOne or more correct options

Choose all the correct statements about neural networks

Select all that apply.

  1. A

    It can not be used for both regression and classification problems

  2. B

    It can have more than two hidden layers

  3. C

    The activation functions have to be non-linear to separate not linearly separable data points

  4. D

    Each neuron in the neural network may or may not have bias associated with it

Show answer

Correct answers

  • B

    It can have more than two hidden layers

  • C

    The activation functions have to be non-linear to separate not linearly separable data points

  • D

    Each neuron in the neural network may or may not have bias associated with it