WorksheetsKNN
Total questions: 20
Worksheet time: 10mins
In the image below, which would be the best value for k assuming that the algorithm you are using is k-Nearest Neighbor.
3
10
20
50
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
1 and 2
1 and 3
Only 1
All of the above
When you find noise in data which of the following option would you consider in k-NN?
I will increase the value of k
I will decrease the value of k
Noise can not be dependent on value of k
None of these
Which of the following will be Euclidean Distance between the two data point A(1,3) and B(2,3)?
1
2
3
4
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?
It is probably a overfitted model
It is probably a underfitted model
Can’t say
None of these
Which of the following statements is true for k-NN classifiers?
The classification accuracy is better with larger values of k
The decision boundary is smoother with smaller values of k
The decision boundary is linear
k-NN does not require an explicit training step
What would be the relation between the time taken by 1-NN,2-NN,3-NN.
1-NN >2-NN >3-NN
1-NN < 2-NN < 3-NN
1-NN ~ 2-NN ~ 3-NN
None of these
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 ?
Apple
Lemon
Mango
orange
Which of the statements about KNN Algorithm is false?
KNN is not suitable for Multi class problems
Suitable for Classification and Regression problems
KNN Algorithm is Sensitive to scale of data
KNN is not suitable when high number of independent variables
Which of the following is a Lazy learner?
KNN Classifier
Decision Tree Claasifier
ANN
Naive Bayes classifier
What type of Machine Learning Algorithm is suitable for predicting the continuous dependent variable?
Logistic Regression
Linear Regression
Decision Tree Classifier
KNN Classifier
The residual is the difference in between ________________
actual value of y and the estimated value of y
actual value of x and the estimated value of x
actual value of y and the estimated value of x
actual value of x and the estimated value of y
Suitable evaluation metric for measuring the performance of a given regression model is
Mean Absolute Error
Root Mean Square Error
Precision
Recall
Appropriate chart for visualizing the linear relationship between two variables is _________________
Scatter plot
Barchart
Histograms
None of Mentioned
The Number of coefficients required to estimate a simple linear regression?
1
2
0
3
KNN is ___________ algorithm
Non-parametric and Lazy Learning
Parametric and Lazy Learning
Parametric and Eager Learning
Non-parametric and Eager Learning
KNN algorithm appropriate for
Lower number of features
Large number of features
No such restriction on number of features
None of the Mentioned
KNN algorithm requires
More time for training
More time for testing
Equal time for training and testing
None of the Mentioned
In a classification problem, the outputs are
categorical or discrete
numerical or continuous
KNeighborsClassifier class can be imported as:
from sklearn.ensemble import KNeighborsClassifier
from sklearn.neighbors import KNeighborsClassifier
from sklearn.tree import KNeighborsClassifier
from sklearn import KNeighborsClassifier
