KNN interview questions
1)Which of the following distance metric can not be used in k-NN?
A) Euclidean Distance
B) Manhatten Distance
c) Hamming Distance
E) Minkowski Distance
F) Jaccard Distance
G) All the above
Answer:- G
All of these distance metric can be used as a distance metric for KNN
2)Knn is for regression or classification?
Answer:- Knn is used for both classification and regression problems.
3) When we use Manhatten Distance?
Answer:-Manhatten distance is used for continuous variables.
4)You have given the following 2 statements, find which of these options is/are true in case of k-NN?
- In the case of very large value of k, we may include points from other classes into the neighborhood, so it leads to overfitting.
- In case of too small value of k the algorithm is very sensitive to noise.(it will affect our model performance).
Answer:-The above two points are answers.
5) which algorithm do you prefer to deal with missing values?
a) Linear Regression
b) Logistic Regression
c) KNN
Answer:-KNN ( while treating missing values knn gives nearest neighbors value to fill the missing term).
6) overfitting in k-nn?
Answer:-In an overfitted module, it seems to be performing well on training data, but it is not generalized enough to give the same results on new data.
Comments
Post a Comment