Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

NPTEL

Video Course on Machine Learning

Professor Carl Gustaf Jansson, KTH

Assignments for Week 4 2024

10 tasks with a total of 20 marks


Assignment tasks - Week 4 2024

Problem # 1 Correct Marks: 2 Theme: Generalization as Search

The different data-driven search approaches to induction require different storage policies.

What does the Breadth First Search algorithm have to store?

A. All positive examples + All negative examples + All hypotheses


B. All positive examples + all hypotheses
C. All negative examples + all hypotheses
D. All hypotheses

Answer: C
Assignment tasks - Week 4 2024

Problem # 2 Correct Marks: 3 Theme: Generalization as Search

An inductive system learns from unordered pairs of data items of the form (size, color, animal)
where size= (large or small), color=(black or brown) and animal=(cat or dog).
How does the set of hypotheses look like after having handled the following three instances:

Instance 1. (Large Black Dog) (Small Brown Cat) } positive


Instance 2. { (Large Brown Cat) (Small Black Dog)} positive
Instance 3. { (Large Brown Dog) (Small Brown Dog) } negative

Using Depth First Search

A. CBH3 ={ (Large ? ?) (Small ? Cat) } B. CBH3={ (Large ? Dog) (Small ? ? ) } C. CBH3=(? Black Dog) (? Brown Cat)}

Using Breadth First Search

A. S3 = { (? Black Dog ) (? Brown Cat) } B. S3 ={ (Large ? ?) (Small ? Cat) } C. S3={ (Large ? ?) (Small ? ? ) }

Using the Version space approach

A. S3 ={(Large ? ?) (Small ? Cat) } G3 = { (? Black ?) (? ? Cat) } { (? ? Cat) (? Brown ?) }


B. S3 ={ (? Black Dog) (? Brown Cat) } G3 = { (? Black ?) (? ? ?) } { (? ? Cat) (? ? ?) }
C. S3 ={ (Large ? ?) (Small ? ? ) } G3 = { (? Black ?) (? Brown ?) } { (? ? Cat) (? ? Dog) }

Answer: C, A, B
Assignment tasks - Week 4 2024

Problem # 3 Correct Marks: 1 Theme: Learning of Decision Trees

Which of the following statements is TRUE for a decision tree?

A. An attribute with lower information gain should be preferred to other attributes.


B. The entropy of a node typically decreases as we go down a decision tree.
C. A Decision tree is an example of a linear classifier.
D. The Entropy of a set increases with its purity.

Answer: B.
Assignment tasks - Week 4 2024

Problem # 4 Correct Marks: 2 Theme: Learning of Decision Trees

What is the entropy for a decision tree data-set with 6 positive and 4 negative examples.

A 0.971 B 0.840 C 0.410

Answer: A
Assignment tasks - Week 4 2024

Problem # 5 Correct Marks: 2 Theme: Instance - based Learning

The circles represent instances


of the algorithm for values of K =1,3,7,9

Query instance

Instance classified as BLUE

Instance classified as RED

For which values of k is the query instance classified as RED


by the k-nearest neighbour algorithm? Answer: A.

A. 3 and 9 B. 1 and 3 C. 3 and 7 D. 1 and 7


Assignment tasks - Week 4 2024

Problem # 6 Correct Marks:2p Theme: Instance - based Learning

For the two feature vectors (1,0,1,0,0,0,1) and (0,0,1,1,1, 1,1).

What is the Manhattan distance between the two vectors?

A 5 B 3 C 2 D 4

Answer: D
Assignment tasks - Week 4 2024

Problem # 7 Correct Marks: 2 p Theme: Instance - based Learning

Consider the following two vectors:


X = [4, 0, 0, 5, 1, 0, 0]
Y = [5, 5, 4, 0, 0, 0, 0]

What is the cosine similarity between X and Y?:


A. 0.53 B. 0.43 C. 0.17 D. 0.38

Answer: D
Assignment tasks - Week 4 2024

Problem # 8 Correct Marks: 3p Theme: Instance - based Learning

Consider a two-dimensional non linearly separable input space and the


following feature mapping onto a linearly separable three dimensional space:

X: = F : ( x1, x2 ) -> (x1^2, x2^2, sqrt 2*x1*x2)


Z: = F : ( z1, z2 ) -> (z1^2, z2^2, sqrt 2*z1*z2)

K (X,Z)= the Kernel or Similarity function in the three dimensional space


= the inner product of X and Z in that space : |X,Z|

Calculate K(X,Z) = the inner product of X and Z above for the two two-
dimensional vectors of (3,2) and (2,3) in the input space.

A. 6 B. 144 C. 124 D. 12

Answer: B
Assignment tasks - Week 4 2024

Problem # 9 Correct Marks: 1p Theme: Cluster Analysis

Partitioning–based clustering is one of the approaches to Cluster Analysis.


Which of the following specific techniques falls in this category?

A. CLIQUE
B. COBWEB
C. K-means
D. Chameleon
E. DBSCAN

Answer: C.
Assignment tasks - Week 4 2024

Problem # 10 Correct Marks: 3p Theme: Cluster Analysis

In hierarchical-based clustering, it is typical to work with Distance Matrices between data


items and so called Proximity Matrices between clusters. A distance Matrix for 6 data items
is given below. We assume three clusters: A-B, C-D and E-F. How does the corresponding
Proximity Matrix between these clusters look like?
A B C D E F
A 0 1 4 2 5 7
B 1 0 2 4 7 5
C 4 2 0 1 3 5
D 2 4 1 0 5 3
E 5 7 3 5 0 1
F 7 5 5 3 1 0

A. B. C.
AB CD EF AB CD EF AB CD EF
AB 0 2 6 AB 0 3 6 AB 0 4 5
CD 3 0 4 CD 3 0 4 CD 4 0 4
EF 5 4 0 EF 6 4 0 EF 5 4 0

Answer: B

You might also like