Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Intro to ML: K-Nearest Neighbours 2024

Total questions: 10

Worksheet time: 13mins

Name
Class
Date
1.

In K-NN, is the query time longer than the training time?

a)

Yes

b)

No

2.

James is trying to decide which machine learning algorithm to use for his project. Which of the following options is true about the k-NN algorithm?

a)

It can only be used for classification

b)

It can only be used for regression

c)

It can be used for both classification and regression

3.

Which of the following is true about Manhattan distances?

a)

It can be used for continuous variables

b)

It can be used for categorical variables

c)

It can be used for categorical as well as continuous variables

4.

Poppy is working on a machine learning project using k-NN and has a dataset with a lot of noise. What are the appropriate things to do with k-NN in this situation?

a)

Increase the value of K

b)

Decrease the value of K

c)

K does not depend on the noise

d)

None of these

5.

In K-NN, what is the effect of increasing/decreasing the value of K?

a)

The boundary becomes smoother with increasing values of K

b)

Smoothness of the boundary does not depend on the value of K

c)

The boundary becomes smoother with decreasing values of K

d)

None of these

6.

For embedded applications (i.e. running on a smartphone), what is the most appropriate family of algorithm?

a)

Eager learners

b)

Lazy learners

7.

Given d the distance between a point of the dataset and the query point, which of the following weight functions is appropriate for Distance-Weighted k-NN?

a)

w = exp( -d )

b)

w = log ( min ( 0.25 * d, 1 ) )

c)

w = -d

8.

Which of the following statements is true for k-NN classifiers?

a)

The classification accuracy is better with larger values of k

b)

The decision boundary is linear

c)

The decision boundary is smoother with smaller values of k

d)

k-NN does not require an explicit training step

9.

The curse of dimensionality only affects k-NN?

a)

True

b)

False

10.

Benjamin is using k-NN to classify types of flowers based on petal measurements. How does the choice of distance metric affect the performance of k-NN?

a)

It does not affect the performance

b)

It affects the accuracy of the model

c)

It only affects the speed of the algorithm

d)

It affects both accuracy and speed