Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

KNN

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

In the image below, which would be the best value for k assuming that the algorithm you are using is k-Nearest Neighbor.

a)

3

b)

10

c)

20

d)

50

2.

Which of the following statement is true about k-NN algorithm?

1- k-NN performs much better if all of the data have the same scale.


2-k-NN works well with a small number of features (X's), but struggles when the number of inputs is very large


3-k-NN makes no assumptions about the functional form of the problem being solved

a)

1 and 2

b)

1 and 3

c)

Only 1

d)

All of the above

3.

When you find noise in data which of the following option would you consider in k-NN?

a)

I will increase the value of k

b)

I will decrease the value of k

c)

Noise can not be dependent on value of k

d)

None of these

4.

Which of the following will be Euclidean Distance between the two data point A(1,3) and B(2,3)?

a)

1

b)

2

c)

3

d)

4

5.

A company has build a kNN classifier that gets 100% accuracy on training data. When they deployed this model on client side it has been found that the model is not at all accurate. Which of the following thing might gone wrong?

a)

It is probably a overfitted model

b)

It is probably a underfitted model

c)

Can’t say

d)

None of these

6.

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 smoother with smaller values of k

c)

The decision boundary is linear

d)

k-NN does not require an explicit training step

7.

What would be the relation between the time taken by 1-NN,2-NN,3-NN.

a)

1-NN >2-NN >3-NN

b)

1-NN < 2-NN < 3-NN

c)

1-NN ~ 2-NN ~ 3-NN

d)

None of these

8.

1. Consider the fruit diameter is 17 means it is "lemon" , diameter is 53 means it is called "Apple" and diameter is 75 means is "mango" . if new diameter is 20 , apply knn classifier to find which type of fruit is ?

a)

Apple

b)

Lemon

c)

Mango

d)

orange

9.

Which of the statements about KNN Algorithm is false?

a)

KNN is not suitable for Multi class problems

b)

Suitable for Classification and Regression problems

c)

KNN Algorithm is Sensitive to scale of data

d)

KNN is not suitable when high number of independent variables

10.

Which of the following is a Lazy learner?

a)

KNN Classifier

b)

Decision Tree Claasifier

c)

ANN

d)

Naive Bayes classifier

11.

What type of Machine Learning Algorithm is suitable for predicting the continuous dependent variable?

a)

Logistic Regression

b)

Linear Regression

c)

Decision Tree Classifier

d)

KNN Classifier

12.

The residual is the difference in between ________________

a)

actual value of y and the estimated value of y

b)

actual value of x and the estimated value of x

c)

actual value of y and the estimated value of x

d)

actual value of x and the estimated value of y

13.

Suitable evaluation metric for measuring the performance of a given regression model is

a)

Mean Absolute Error

b)

Root Mean Square Error

c)

Precision

d)

Recall

14.

Appropriate chart for visualizing the linear relationship between two variables is _________________

a)

Scatter plot

b)

Barchart

c)

Histograms

d)

None of Mentioned

15.

The Number of coefficients required to estimate a simple linear regression?

a)

1

b)

2

c)

0

d)

3

16.

KNN is ___________ algorithm

a)

Non-parametric and Lazy Learning

b)

Parametric and Lazy Learning

c)

Parametric and Eager Learning

d)

Non-parametric and Eager Learning

17.

KNN algorithm appropriate for

a)

Lower number of features

b)

Large number of features

c)

No such restriction on number of features

d)

None of the Mentioned

18.

KNN algorithm requires

a)

More time for training

b)

More time for testing

c)

Equal time for training and testing

d)

None of the Mentioned

19.

In a classification problem, the outputs are

a)

categorical or discrete

b)

numerical or continuous

20.

KNeighborsClassifier class can be imported as:

a)

from sklearn.ensemble import KNeighborsClassifier

b)

from sklearn.neighbors import KNeighborsClassifier

c)

from sklearn.tree import KNeighborsClassifier

d)

from sklearn import KNeighborsClassifier