Nearest Neighbor Analysis Questions and Answers

This set of Machine Learning Multiple Choice Questions & Answers (MCQs) focuses on “Nearest Neighbor Analysis”.

1. In kNN too large value of K has a negative impact on the data points.
a) True
b) False
View Answer

Answer: a
Explanation: Too large value of K in kNN has a negative impact on the data points. A too large value of K is detrimental as it destroys the locality of information since farther examples are taken into account. It also increases the computational burden.

2. It is good to use kNN for large data sets.
a) True
b) False
View Answer

Answer: b
Explanation: KNN works well with smaller dataset because it is a lazy learner. It needs to store all the data and then makes decision only at run time. So, if dataset is large, there will be a lot of processing which may adversely impact the performance of the algorithm.

3. When we set K = 1 in kNN algorithm, the predictions become more stable.
a) True
b) False
View Answer

Answer: b
Explanation: As we decrease the value of K to 1, our predictions become less stable. Choosing smaller values for K can be noisy and will have a higher influence on the result. In general, choosing the value of k is k = sqrt (N) where N stands for the number of samples in your training dataset.
advertisement
advertisement

4. Setting large values of K in kNN is computationally inexpensive.
a) True
b) False
View Answer

Answer: b
Explanation: Setting large values of K in kNN is computationally expensive. Larger values of K will have smoother decision boundaries which mean lower variance but increased bias. ‘K’ in kNN algorithm is based on feature similarity and choosing the right value of K is a process called parameter tuning.

5. Which of the following statements is not a feature of kNN?
a) K-NN has assumptions
b) K-NN is pretty intuitive and simple
c) No Training Step
d) It constantly evolves
View Answer

Answer: a
Explanation: In kNN there are no assumptions to be met to implement kNN. Parametric models like linear regression has lots of assumptions to be met by data before it can be implemented which is not the case with kNN. All other three statements are the advantages of kNN.

6. Which of the following statements is not a feature of kNN?
a) Very easy to implement for multi-class problem
b) One Hyper Parameter
c) Variety of distance criteria to be choose from
d) Fast algorithm for large dataset
View Answer

Answer: d
Explanation: kNN is a slow algorithm. KNN might be very easy to implement but as dataset grows efficiency or speed of algorithm declines very fast. So, it is a slow algorithm for large dataset. All other three statements are the advantages of kNN.

7. Which of the following statements is not a feature of kNN?
a) K-NN does not need homogeneous features
b) Curse of Dimensionality
c) Optimal number of neighbors
d) Outlier sensitivity
View Answer

Answer: a
Explanation: K-NN needs homogeneous features. If you decide to build k-NN using a common distance, like Euclidean or Manhattan distances, it is completely necessary that features have the same scale, since absolute differences in features weight the same, i.e., a given distance in feature 1 must means the same for feature 2.
advertisement

8. KNN performs well on imbalanced data.
a) True
b) False
View Answer

Answer: a
Explanation: k-NN doesn’t perform well on imbalanced data. If we consider two classes, A and B, and the majority of the training data is labeled as A, then the model will ultimately give a lot of preference to A. This might result in getting the less common class B wrongly classified.

9. In kNN low K value is sensitive to outliers.
a) True
b) False
View Answer

Answer: a
Explanation: KNN is sensitive to outliers. Low k-value is sensitive to outliers and a higher K-value is more flexible to outliers as it considers more voters to decide prediction.
advertisement

10. Cross-validation is a smart way to find out the optimal K value.
a) True
b) False
View Answer

Answer: a
Explanation: Cross-validation is a smart way to find out the optimal K value. It estimates the validation error rate by holding out a subset of the training set from the model building process.

Sanfoundry Global Education & Learning Series – Machine Learning.

To practice all areas of Machine Learning, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.