Disclaimer:
Educational Use Only:
The website links provided are to be used strictly for educational and knowledge-gaining purposes only.
No Misuse:
Do not misuse the links or the information contained therein for any commercial, illegal, or unethical activities.
Respect for Websites and Businesses:
Respect the intellectual property and business interests of the websites and their owners. Do not attempt to alter, copy, or redistribute content without proper authorization.
Acknowledge Value of Knowledge:
Recognize and value the knowledge and resources shared by these websites. Use the information responsibly and ethically.
No Endorsement:
The provision of these links does not imply endorsement of the linked sites, their content, or their products and services. Users are responsible for evaluating the suitability and accuracy of the information.
User Responsibility:
By accessing these links, you agree to use the information at your own risk and to comply with all applicable laws and website terms of use.
Overall MCQs for Reference
- Which type of learning does the KNN algorithm utilize?
a. Supervised learning
b. Unsupervised learning
c. Reinforcement learning
d. None of these
Answer: a. Supervised learningultralytics+1 - What does ‘k’ represent in KNN?
a. Number of data features
b. Number of nearest neighbors considered
c. Dataset size
d. Number of classes
Answer: b. Number of nearest neighbors consideredelastic+1 - Which distance metric is most commonly used in KNN?
a. Hamming distance
b. Jaccard distance
c. Euclidean distance
d. Cosine distance
Answer: c. Euclidean distancegeeksforgeeks+1 - In KNN, what is the process of predicting the label for a new data point?
a. Majority voting among k neighbors
b. Regression line fitting
c. Clustering
d. Gradient descent
Answer: a. Majority voting among k neighborsappliedaicourse+1 - KNN can be used for which kinds of prediction tasks?
a. Only classification
b. Only regression
c. Both classification and regression
d. Only clustering
Answer: c. Both classification and regressionw3schools+1 - What makes KNN a “lazy learner” model?
a. It precomputes possible outputs
b. It stores the entire dataset for queries
c. It builds a model during training
d. It updates parameters frequently
Answer: b. It stores the entire dataset for queriesgeeksforgeeks+1 - Which parameter in KNN is selected via cross-validation to optimize accuracy?
a. Distance metric
b. Feature transformation
c. k-value
d. Training algorithm
Answer: c. k-valuegeeksforgeeks+1 - What happens if ‘k’ is set too high in KNN?
a. Model overfits
b. Model becomes more sensitive
c. Model underfits
d. Model is unaffected
Answer: c. Model underfitsstudocu+1 - For a binary classification, KNN uses which method to assign class labels?
a. Least absolute deviations
b. Majority class among neighbors
c. First neighbor’s class
d. Random selection
Answer: b. Majority class among neighborsappliedaicourse+1 - What challenge does KNN face in high-dimensional data spaces?
a. Increased speed
b. Reduced memory usage
c. Curse of dimensionality
d. Improved accuracy
Answer: c. Curse of dimensionality360digitmg+1 - Which step is not necessary for KNN model fitting?
a. Data normalization
b. Model training
c. Storing the data
d. Selecting a value for k
Answer: b. Model trainingultralytics+1 - Which effect does feature scaling have on KNN?
a. No effect
b. Improves sensitivity to relevant features
c. Reduces accuracy
d. Increases computation time
Answer: b. Improves sensitivity to relevant featuresgeeksforgeeks+1 - Why is KNN called a non-parametric model?
a. It does not assume any underlying data distribution
b. It captures parameters during training
c. It requires parameter tuning
d. It uses a parametric function
Answer: a. It does not assume any underlying data distributionindiaai+1 - Which of the following is true regarding KNN computational complexity during prediction?
a. Very low
b. Constant time
c. Linear to dataset size
d. Does not depend on dataset
Answer: c. Linear to dataset sizecsethings+1 - What is the typical output for a KNN regression task?
a. Class label
b. Model coefficients
c. Mean or median of neighbor values
d. Mode of neighbor classes
Answer: c. Mean or median of neighbor valuesneptune+1 - Which process helps KNN handle imbalanced classes?
a. Distance weighting
b. Random oversampling
c. PCA transformation
d. Feature binning
Answer: a. Distance weightingultralytics+1 - What should be done if different features have different scales for KNN?
a. Nothing
b. Normalize or standardize features
c. Drop features
d. Duplicate features
Answer: b. Normalize or standardize featuresgeeksforgeeks+1 - Which is not a typical use case of KNN?
a. Image classification
b. Recommendation systems
c. Time sequence forecasting
d. Regression tasks
Answer: c. Time sequence forecastingneptune+1 - Which value of k generally increases risk of overfitting in KNN?
a. High k
b. Low k
c. k = 0
d. Variable k
Answer: b. Low ksanfoundry+1 - What type of algorithm is KNN, in terms of model construction?
a. Eager learning
b. Lazy learning
c. Deep learning
d. Active learning
Answer: b. Lazy learningneptune+1 - What is one downside of high memory requirements in KNN?
a. Increased speed
b. Larger models scale poorly
c. More robust predictions
d. Lower model accuracy
Answer: b. Larger models scale poorlyelastic+1 - Which function does KNN use to measure proximity between points?
a. Kernel density estimation
b. Similarity scoring
c. Distance metric
d. Activation function
Answer: c. Distance metricelastic+1 - If two classes are equally present among the k neighbors, what does KNN typically do?
a. Picks one at random
b. Assigns higher prior class
c. Uses weighted distance vote
d. Ignores those neighbors
Answer: c. Uses weighted distance voteappliedaicourse+1 - What should not be used as k value in KNN?
a. Even values for binary class
b. Odd values for binary class
c. Prime values
d. Both even and odd are valid
Answer: a. Even values for binary classsanfoundry+1 - Which method helps optimize k value in KNN?
a. Visualization
b. Cross-validation
c. Removing labels
d. Adding random noise
Answer: b. Cross-validation360digitmg+1 - What happens to KNN accuracy as outliers increase?
a. Increases
b. Stays the same
c. Decreases
d. Not affected
Answer: c. Decreasesultralytics+1 - In KNN, the prediction for a regression problem is?
a. Majority vote
b. Average of k nearest neighbor values
c. Highest value among neighbors
d. Median of dataset
Answer: b. Average of k nearest neighbor valuesneptune+1 - What is a limitation of KNN on large datasets?
a. Low memory requirement
b. Fast query time
c. Slow prediction due to search
d. Always accurate
Answer: c. Slow prediction due to searchcsethings+1 - Which preprocessing step is vital before applying KNN?
a. Feature scaling
b. Feature encoding
c. Feature creation
d. Feature reduction
Answer: a. Feature scalinggeeksforgeeks+1 - In KNN, which type of data is most affected by chosen distance metric?
a. Categorical
b. Numerical
c. Binary
d. Time series
Answer: b. Numericalappliedaicourse+1 - KNN is best described by which approach?
a. Instance-based learning
b. Model-based learning
c. Ensemble learning
d. Feature-based learning
Answer: a. Instance-based learningibm+1 - Why is KNN sensitive to irrelevant features?
a. All are normalized
b. All features affect distance calculation
c. Only label affects output
d. Only main features are considered
Answer: b. All features affect distance calculationgeeksforgeeks+1 - What is the role of weights in weighted KNN?
a. Increase importance of distant points
b. Reduce importance of closer points
c. Assign higher importance to closer neighbors
d. No effect
Answer: c. Assign higher importance to closer neighborsultralytics+1 - Which distance metric is preferred when features are categorical?
a. Euclidean distance
b. Manhattan distance
c. Hamming distance
d. Minkowski distance
Answer: c. Hamming distancegeeksforgeeks+1 - How does KNN react to noise in data?
a. Robust
b. Very sensitive
c. Insensitive
d. Improves accuracy
Answer: b. Very sensitiveappliedaicourse+1 - Which memory requirement does KNN have compared to parametric models?
a. Lower
b. Higher
c. Same
d. Random
Answer: b. Higherelastic+1 - What is the prediction logic for KNN for a new point?
a. Ignores dataset
b. Analyzes k most similar points
c. Uses random class assignment
d. Model output alone
Answer: b. Analyzes k most similar pointsgeeksforgeeks+1 - KNN accuracy declines most in which scenario?
a. Large datasets
b. Small datasets
c. Highly noisy data
d. Increasing number of features
Answer: c. Highly noisy dataultralytics+1 - What is a common use of KNN in AI applications?
a. Forecasting
b. Image classification
c. Outlier detection
d. Quantum computing
Answer: b. Image classificationneptune+1 - Why is KNN rarely used for very large datasets?
a. Training time is high
b. Query time is slow
c. Needs feature engineering
d. Lacks scalability
Answer: b. Query time is slowcsethings+1 - What does “non-parametric” mean in KNN context?
a. No parameter tuning
b. No assumptions about data structure
c. Parameters fixed during analysis
d. Always fits a polynomial
Answer: b. No assumptions about data structureindiaai+1 - Which choice of ‘k’ makes KNN model more stable but less sensitive?
a. Very high k
b. Very low k
c. Negative k
d. Variable k
Answer: a. Very high kstudocu+1 - Which is a practical method to determine best k in KNN?
a. Trial and error
b. Random guess
c. Cross-validation
d. Data normalization
Answer: c. Cross-validation360digitmg+1 - Why does KNN require high memory?
a. It stores model parameters
b. It memorizes all training data
c. It compresses the dataset
d. No memory needed
Answer: b. It memorizes all training dataelastic+1 - When using weighted KNN, how are neighbor votes adjusted?
a. Equally
b. Based on inverse of distance
c. Randomly
d. By absolute value of points
Answer: b. Based on inverse of distanceappliedaicourse+1 - Which feature(s) does KNN use directly for prediction?
a. Only the labels
b. Only the closest neighbor’s value
c. All feature values of dataset
d. All labels of dataset
Answer: c. All feature values of datasetgeeksforgeeks+1 - KNN is best applied in which type of problem?
a. Classification and regression
b. Time series prediction
c. Deep feature extraction
d. Model interpretation
Answer: a. Classification and regressionw3schools+1 - Before applying KNN, what is necessary for input features?
a. Encoding
b. Randomization
c. Scaling/normalization
d. Dimensionality increase
Answer: c. Scaling/normalizationgeeksforgeeks+1 - In KNN, which output is given for a similarity search?
a. Closest points among dataset
b. Top feature values
c. Data clusters
d. Outlier points
Answer: a. Closest points among datasetgeeksforgeeks+1 - Which algorithm is similar in “instance based” approach to KNN?
a. Decision tree
b. Support vector machine
c. Memory-based learner
d. Random forest
Answer: c. Memory-based learneribm+1
- https://www.ultralytics.com/glossary/k-nearest-neighbors-knn
- https://www.ibm.com/think/topics/knn
- https://www.elastic.co/what-is/knn
- https://www.lingayasvidyapeeth.edu.in/knn-algorithm-in-machine-learning/
- https://www.geeksforgeeks.org/machine-learning/k-nearest-neighbours/
- https://www.appliedaicourse.com/blog/knn-algorithm-in-machine-learning/
- https://www.w3schools.com/python/python_ml_knn.asp
- https://www.geeksforgeeks.org/quizzes/k-nearest-neighbors-knn-questions-and-answer/
- https://www.studocu.com/in/document/savitribai-phule-pune-university/bsc-computer-science/mcq-knn-knn-quiz/11200178
- https://www.sanfoundry.com/machine-learning-questions-answers-nearest-neighbor-analysis/
- https://360digitmg.com/blog/knn-interview-questions-and-answers
- https://indiaai.gov.in/article/understanding-the-k-nearest-neighbours-algorithm
- https://csethings.com/k-nearest-neighbours-mcqs/
- https://neptune.ai/blog/knn-algorithm
- https://www.sanfoundry.com/machine-learning-questions-answers-k-nearest-neighbor-algorithm/
- https://www.youtube.com/watch?v=b6uHw7QW_n4
- https://www.scribd.com/document/700393528/AMNA-SHAHID-docx-MCQS
- https://docs.aws.amazon.com/sagemaker/latest/dg/k-nearest-neighbors.html
- https://www.datacamp.com/tutorial/k-nearest-neighbor-classification-scikit-learn