0% found this document useful (0 votes)
11 views5 pages

ML Quiz 4

Uploaded by

shobhitraj0011
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views5 pages

ML Quiz 4

Uploaded by

shobhitraj0011
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

CSE343/CSE543/ECE363/ECE563: Machine Learning Sec A (Monsoon 2023)

Quiz - 4

Date of Examination: 21.11.2023 Duration: 30 mins Total Marks: 15 marks

Instructions –

• Attempt all questions.


• MCQs have a single correct option.
• State any assumptions you have made clearly.
• Standard institute plagiarism policy holds.
• No evaluation without suitable justification.

0 marks if the option or justification of MCQs is incorrect.

1. The advantages of CNNs over ANNs for image classification are - [1 mark]

(A) Location Invariance of features.


(B) Reusable weights.
(C) Can process sequential data.
(D) Accepts arbitrary input size.

(i) B and C.
(ii) B and D.
(iii) A and B.
(iv) A, B and D.

Both (iii) and (iv) will be considered. Convolution filters are invariant to translation,rotation etc during
feature extraction, also the same kernel is used over multiple patches of the image, thus reusing weights.
Moreover if the network has only Convolution and pooling layers then it is also invariant to input size

2. Mahalnobis distance is better than euclidean distance for clustering as it takes into consideration: [1 mark]

(A) Outliers in the sample data.


(B) Non-spherical shape of the sample data.
(C) Correlation among the features.
(D) Unequal size of the clusters.

(C) Mahalnobis distance takes into account the correlation matrix while calculating the distance.

3. What is the size of the output image if a 3x3 convolutional kernel is applied over an input image of shape
32x32 ? (assume stride=1) [1 mark]

(A) 30x30.
(B) 29x29.
(C) 28x28.
(D) 31x31.
Figure 1: Diagram for Question 5

(A), If image is mxn and kernel is pxq then resultant size is (m-p+1)x(n-q+1) assuming that stride=1

4. In a CNN with two layers: 1 convolutional layer with kernel size 6 x 6 followed by a max pooling layer,
the total number of trainable parameters is (the image size is 28 × 28): - [1 mark]

1. 484
2. 37
3. 821
4. 13

B, The total number of parameters in the first layer is 6 x 6 = 36 and one bias which makes it 37. The
pooling layer has no learnable parameters.

5. Consider the two MLPs as shown in the figure. They have identity activation (f(x) = x) at all the neurons.
Which model has better expressive power? [4 marks]
Rubric: 1.5 marks for each model output, 1 mark for final conclusion.

6. Consider the following data points: A = (8, 8), B = (14, 12), C = (12, 14), and D = (8, 10). We want
to use the K-Means algorithm with Manhattan distance to cluster the data points into two clusters, C1
and C2 . To initialize the algorithm, we consider C1 = {A, C} and C2 = {B, D}. Perform the K-means
clustering algorithm till it converges. What are the coordinates of the centers of clusters, and which points
belong to which cluster? Hint: Manhattan distance is calculated as : [3 marks]

n
X
distance(x, y) = |xi − yi |
i=1

Rubric: 0.5 mark for initial clusters, 1 mark for assigning new clusters to each point, 1 mark for updating
new cluster centers, 0.5 mark for next iteration to prove convergence.

7. Consider a hypothetical distance metric defined below. Does this qualify as a valid distance metric which
we can use for clustering? If yes, state the reasons, else state how d(X, Y ) can be modified to make it a
valid distance metric. [4 marks]

p 
d(X, Y ) = log (x1 − y1 )2 + (x2 − y2 )2
Rubric: 1 mark for each condition and its rectification.
Figure 2: Soln for Question 5
Figure 3: Soln for Question 6
Figure 4: Soln for Question 7

You might also like