Quiz Space

September 2023 term · Machine Learning Techniques · BSCS2007

MLT Quiz 1: 29 October 2023 (September 2023 term)

The IIT Madras BS Machine Learning Techniques (MLT) Quiz 1 paper sat on 29 Oct 2023, in the September 2023 term: 13 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
13
Marks
50
Duration
120 min
MCQ
6
MSQ
2
Numerical
5

Updated

Official paper: IIT M DIPLOMA AN2 EXAM QPD2 29 Oct 2023 · No negative marking.

Question 1

+4 marksOne correct option

In the K-means algorithm, cluster centroids (μk)(\mu_k) are updated at each iteration to minimize the sum of squared distances between data points and their assigned centroids. The formula used for this update is:

μk=∑xi1(zi=k)∑1(zi=k)\mu_k = \frac{\sum x_i \mathbb{1}(z_i = k)}{\sum \mathbb{1}(z_i = k)}

Here:

  • xix_i represents ithi^{\text{th}} data point in the dataset.
  • ziz_i represents the cluster assignment for data point xix_i, where ziz_i is an integer indicating the cluster index (k)(k).

Suppose you have a dataset of 9 two-dimensional data points and are performing K-means clustering with K=3K = 3 clusters. After the first iteration, clusters C1,C2C_1, C_2, and C3C_3 have the following data points:

C1C_1: {(2,2),(3,3),(4,4)}\{(2, 2), (3, 3), (4,4) \}
C2C_2: {(6,6),(7,7),(8,8)}\{ (6, 6), (7, 7),(8,8 )\}
C3C_3: {(10,10),(11,11),(12,12)}\{(10, 10), (11, 11), (12, 12)\}

After the second iteration, which of the following options represents the updated cluster centroid μk\mu_k for C1C_1 using the provided formula?

  1. A

    μ1 = (2.5, 2.5)

  2. B

    μ1 = (4.5, 4.5)

  3. C

    μ1 = (3, 3)

  4. D

    μ1 = (5.5, 5.5)

Show answer

Correct answer

  • C

    μ1 = (3, 3)

Question 2

+4 marksOne correct option

Consider 9 data points x1,x2,…,x9x_1, x_2, \ldots, x_9: (2,3),(1,2),(3,1),(5,6),(7,8),(9,9),(6,7),(10,10),(11,11)(2,3),(1,2),(3,1),(5,6),(7,8),(9,9),(6,7),(10,10),(11,11). Suppose we aim to form 3 clusters from these points using the K-Means algorithm. After the first iteration, clusters C1,C2,C3C_1, C_2, C_3 have the following data points:

C1C_1: (1,2),(3,1)(1, 2), (3, 1)
C2C_2: (2,3),(5,6),(6,7)(2, 3), (5, 6), (6,7)
C3C_3: (9,9),(7,8),(10,10),(11,11)(9, 9), (7, 8), (10, 10), (11, 11)

After the second iteration, to which cluster will the data point (2,3)(2, 3) be reassigned?

  1. A

    C1

  2. B

    C2

  3. C

    C3

  4. D

    It remains in the same cluster as in the first iteration

Show answer

Correct answer

  • A

    C1

Question 3

+4 marksOne or more correct options

Which of the following statements are true regarding applying standard PCA on a centered dataset?

Select all that apply.

  1. A

    The variance of the dataset along the first principal component is maximum.

  2. B

    Eigenvectors are always orthogonal to each other in PCA.

  3. C

    The first principal component is the eigenvector corresponding to the largest eigenvalue of the covariance matrix.

  4. D

    The first principal component is the eigenvector corresponding to the smallest eigenvalue of the covariance matrix.

Show answer

Correct answers

  • A

    The variance of the dataset along the first principal component is maximum.

  • B

    Eigenvectors are always orthogonal to each other in PCA.

  • C

    The first principal component is the eigenvector corresponding to the largest eigenvalue of the covariance matrix.

Question 4

+4 marksNumerical answer

Consider a dataset that has 200 data-points, each of which is either a zero or one. The Bernoulli distribution is used to model this data. If the MLE estimate for the parameter p of the Bernoulli distribution is 0.3, how many zeros does the dataset have?

Show answer

Correct answer: 140

Question 5

+4 marksNumerical answer
Show answer

Correct answer: 625

Question 6

+4 marksNumerical answer
Show answer

Correct answer: 4

Question 7

+4 marksNumerical answer
Show answer

Correct answer: 0.35 (accepted within ±0.05)

Question 8

+3 marksNumerical answer

Suppose you have been given a task of estimating the conversion rate of google click of new online advertisement campaign. You have collected data from a limited sample of 5050 users, where 1515 of them have converted. You want to use Bayesian estimation with a prior distribution to provide a more robust estimate of the conversion rate.

Assume you have prior information and you decide to use a beta distribution as your prior. You choose a beta distribution with parameters α=3\alpha = 3 and β=4\beta = 4 to capture your prior beliefs.

Calculate the posterior mean?

Enter your answer correctly up to two decimals

Show answer

Correct answer: 0.25 (accepted within ±0.05)

Question 9

+4 marksOne correct option

A k-means++ algorithm with k= 3 was applied to the following 2D points:
(2, 2), (3, 3), (4, 4), (10, 10), (12, 12), (13, 13)
(2, 2) is chosen as the first cluster mean.
Based on the above data, answer the given subquestions.

Which point has the highest probability of being chosen as the 2*^(nd)* cluster mean? Use the Manhattan distance to compute the distances.

  1. A

    (4, 4)

  2. B

    (12, 12)

  3. C

    (10, 10)

  4. D

    (13, 13)

Show answer

Correct answer

  • C

    (10, 10)

Question 10

+4 marksOne correct option

A k-means++ algorithm with k= 3 was applied to the following 2D points:
(2, 2), (3, 3), (4, 4), (10, 10), (12, 12), (13, 13)
(2, 2) is chosen as the first cluster mean.
Based on the above data, answer the given subquestions.

Let’s assume that (3, 3), (10, 10), and (12, 12) are the cluster means. You introduce a new data point, (−5, 10). Which cluster mean is the data point (−5, 10) closest to when using the Euclidean distance method?

  1. A

    (3, 3)

  2. B

    (10, 10)

  3. C

    (12, 12)

  4. D

    None of these

Show answer

Correct answer

  • B

    (10, 10)

Question 11

+4 marksOne or more correct options

Suppose that we have a dataset (data matrix) X∈RdxnX \in \mathbb{R}^{dxn}, where dd denotes the number of features and nn denotes the number of samples. Assume that d>>nd >> n and the data is centered. The representative line is given by the unit vector, pointing in the direction of the line, w\mathbf{w}.

In all the cases, we maximize the objective function given below

f(w)=wTCwf(\mathbf{w}) = \mathbf{w}^T C \mathbf{w}

where C=1nXXTC = \frac{1}{n} X X^T is a covariance matrix. The kernel matrix is defined to be K=XTXK = X^T X.

Based on the above data, answer the given subquestions.

Which of the following statements are true?

Select all that apply.

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

Correct answers

  • B
  • C
  • E

Question 12

+4 marksOne correct option

Suppose that we have a dataset (data matrix) X∈RdxnX \in \mathbb{R}^{dxn}, where dd denotes the number of features and nn denotes the number of samples. Assume that d>>nd >> n and the data is centered. The representative line is given by the unit vector, pointing in the direction of the line, w\mathbf{w}.

In all the cases, we maximize the objective function given below

f(w)=wTCwf(\mathbf{w}) = \mathbf{w}^T C \mathbf{w}

where C=1nXXTC = \frac{1}{n} X X^T is a covariance matrix. The kernel matrix is defined to be K=XTXK = X^T X.

Based on the above data, answer the given subquestions.

Which of the following matrices helps in transforming the eigenvectors of K to the eigenvectors of C?

  1. A

    X

  2. B

    X^(T)

  3. C

    C⁻¹

  4. D

    K⁻¹

  5. E

    X⁻¹

Show answer

Correct answer

  • A

    X

Question 13

+3 marksOne correct option

Suppose that we have a dataset (data matrix) X∈RdxnX \in \mathbb{R}^{dxn}, where dd denotes the number of features and nn denotes the number of samples. Assume that d>>nd >> n and the data is centered. The representative line is given by the unit vector, pointing in the direction of the line, w\mathbf{w}.

In all the cases, we maximize the objective function given below

f(w)=wTCwf(\mathbf{w}) = \mathbf{w}^T C \mathbf{w}

where C=1nXXTC = \frac{1}{n} X X^T is a covariance matrix. The kernel matrix is defined to be K=XTXK = X^T X.

Based on the above data, answer the given subquestions.

Suppose that the 95% of the variance of the data is captured using d − 1 eigenvectors. This implies that

  1. A
  2. B
Show answer

Correct answer

  • B