uiz Space

May 2025 term · Machine Learning Techniques · BSCS2007

Machine Learning Techniques Quiz 2: 3 August 2025 (May 2025 term)

The IIT Madras BS Machine Learning Techniques (MLT) Quiz 2 paper sat on 3 Aug 2025, in the May 2025 term: 15 questions for 40 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
40
Duration
120 min
MCQ
7
MSQ
2
Numerical
6

Updated

Official paper: IIT M DEGREE AN EXAM QDB2 03 Aug 2025 · No negative marking.

Question 1

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • A

Question 2

+3 marksOne correct option

In the Bayesian modeling for linear regression, we assume the following:

  • y∣x∼Normal(wTx,σ2I)y \mid x \sim \text{Normal}(w^Tx, \sigma^2 I)
  • w∼Normal(0,γ2I)w \sim \text{Normal}(0, \gamma^2 I)

Under this setup, the maximum aposteriori (MAP) estimator of the weights w^MAP\hat{w}_{\text{MAP}} is given by:

w^MAP=arg⁡min⁡w{∥y−XTw∥2+λ∥w∥2}\hat{w}_{\text{MAP}} = \arg\min_{w} \left\{\|y - X^Tw\|^2 + \lambda\|w\|^2\right\}

Using the given information, find the expression for the regularization parameter λ\lambda.

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

Correct answer

  • C

Question 3

+3 marksOne correct option

You are evaluating the performance of a linear regression model using different hyperparameter settings (learning rate and number of iterations). Below are the results:

SettingLearning RateIterationsTraining ErrorValidation Error
10.051000150160
20.10800145150
30.15500140190
40.25350170180

Which hyperparameter setting would you choose based on the training and validation errors? Why?

  1. A

    Setting 3, because it has the lowest training error, indicating the best fit to the training data.

  2. B

    Setting 2, because it has the lowest validation error and a relatively low training error, indicating a good generalization.

  3. C

    Setting 1, because it has the highest number of iterations and therefore likely to be more stable.

  4. D

    Setting 4, because it uses the highest learning rate and converges the fastest.

Show answer

Correct answer

  • B

    Setting 2, because it has the lowest validation error and a relatively low training error, indicating a good generalization.

Question 4

+3 marksOne correct option

Consider the linear regression model:

y=wTx+ϵy = w^Tx + \epsilon

where ϵ∼N(0,σ2)\epsilon \sim \mathcal{N}(0, \sigma^2).

Note:

  • w^MLE\hat{w}_{\text{MLE}}: Maximum Likelihood Estimator (MLE) of ww
  • w^MAP\hat{w}_{\text{MAP}}: Maximum A Posteriori (MAP) estimator of ww
  • E(∥w^−w∥2)\mathbb{E}\left(\|\hat{w} - w\|^2\right): Mean Squared Error (MSE) between an estimator w^\hat{w} and the true parameter ww

Which of the following statements is/are true?

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

Correct answer

  • C

Question 5

+2 marksOne correct option
  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 6

+1 markOne correct option
  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 7

+2 marksOne or more correct options

Select all that apply.

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

Correct answers

  • A
  • C

Question 8

+2 marksOne or more correct options

Which among the following are true?

Select all that apply.

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

Correct answers

  • A
  • C

Question 9

+3 marksNumerical answer

Perform a 3-NN regressor for the following dataset:

x1x_1x2x_2yy
123.5
212.8
335.1
424.7
536.2
615.9

where, x=[x1x2]Tx = \begin{bmatrix} x_1 & x_2 \end{bmatrix}^T is a feature vector and yy is the label. What will be the predicted value for the test data point [32]T\begin{bmatrix} 3 & 2 \end{bmatrix}^T? Enter the answer correct to one decimal place.

Show answer

Correct answer: 4.2

Question 10

+3 marksOne correct option

Based on the above data, answer the given subquestions.

Which among the following represents the correct decision boundary for the decision tree? Note: Here + represents the label 1 and − represents the label 0.

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

Correct answer

  • B

Question 11

+2 marksNumerical answer

Based on the above data, answer the given subquestions.

What will be the prediction for the new datapoint (2, 2)?

Show answer

Correct answer: 0

Question 12

+2 marksNumerical answer

Consider a 2-class Naive Bayes classifier with first feature f1f_1 as binary and the second feature f2f_2 as Gaussian. Following are the information that are provided to us:

Estimate of P(Y=1),p^=0.4P(Y = 1), \hat{p} = 0.4
Estimate of P(f1=1∣y=0)P(f_1 = 1 \mid y = 0), p^10=0.4\hat{p}_1^0 = 0.4
Estimate of P(f1=1∣y=1)P(f_1 = 1 \mid y = 1), p^11=0.5\hat{p}_1^1 = 0.5
(f2∣y=0)∼Normal(0,1)(f_2 \mid y = 0) \sim \text{Normal}(0, 1)
(f2∣y=1)∼Normal(1,1)(f_2 \mid y = 1) \sim \text{Normal}(1, 1)

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 0.24 (accepted within ±0.02)

Question 13

+3 marksNumerical answer

Consider a 2-class Naive Bayes classifier with first feature f1f_1 as binary and the second feature f2f_2 as Gaussian. Following are the information that are provided to us:

Estimate of P(Y=1),p^=0.4P(Y = 1), \hat{p} = 0.4
Estimate of P(f1=1∣y=0)P(f_1 = 1 \mid y = 0), p^10=0.4\hat{p}_1^0 = 0.4
Estimate of P(f1=1∣y=1)P(f_1 = 1 \mid y = 1), p^11=0.5\hat{p}_1^1 = 0.5
(f2∣y=0)∼Normal(0,1)(f_2 \mid y = 0) \sim \text{Normal}(0, 1)
(f2∣y=1)∼Normal(1,1)(f_2 \mid y = 1) \sim \text{Normal}(1, 1)

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 1

Question 14

+3 marksNumerical answer

Suppose you want to build a decision tree to help diagnose a certain disease based on patient data. You have a dataset of 1000 patients labeled as either “positive” or “negative”. Here, positive represents patients with the disease and negative represents no disease. One of the feature used to diagnose is headache.
Below is the breakdown of the patients reporting headache:
Headache present: 300 positive, 50 negative
Headache not present: 100 positive, 550 negative

Use the following values if required:

  • log⁡2(0.4)=−1.32\log_2(0.4) = -1.32
  • log⁡2(0.6)=−0.74\log_2(0.6) = -0.74
  • log⁡2(0.86)=−0.22\log_2(0.86) = -0.22
  • log⁡2(0.14)=−2.84\log_2(0.14) = -2.84
  • log⁡2(0.15)=−2.74\log_2(0.15) = -2.74
  • log⁡2(0.85)=−0.23\log_2(0.85) = -0.23

Note: Use log⁡2\log_2 for the entropy calculations.

Based on the above data, answer the given subquestions.

What is the entropy of the root node? Enter the answer correct to two decimal places.

Show answer

Correct answer: 0.97 (accepted within ±0.02)

Question 15

+4 marksNumerical answer

Suppose you want to build a decision tree to help diagnose a certain disease based on patient data. You have a dataset of 1000 patients labeled as either “positive” or “negative”. Here, positive represents patients with the disease and negative represents no disease. One of the feature used to diagnose is headache.
Below is the breakdown of the patients reporting headache:
Headache present: 300 positive, 50 negative
Headache not present: 100 positive, 550 negative

Use the following values if required:

  • log⁡2(0.4)=−1.32\log_2(0.4) = -1.32
  • log⁡2(0.6)=−0.74\log_2(0.6) = -0.74
  • log⁡2(0.86)=−0.22\log_2(0.86) = -0.22
  • log⁡2(0.14)=−2.84\log_2(0.14) = -2.84
  • log⁡2(0.15)=−2.74\log_2(0.15) = -2.74
  • log⁡2(0.85)=−0.23\log_2(0.85) = -0.23

Note: Use log⁡2\log_2 for the entropy calculations.

Based on the above data, answer the given subquestions.

What is the information gain for choosing the feature “headache” for splitting at the root node? Enter the answer correct to two decimal places.

Show answer

Correct answer: 0.36 (accepted within ±0.02)