Your KNN classifier performs barely better than a majority-class baseline. How would you diagnose the problem?

Quick Overview

Asks how to diagnose a k-nearest neighbors classifier that barely beats a majority-class baseline. Tests whether you check the evaluation setup first, know what KNN distances are sensitive to, and can separate a model problem from features that carry no signal.

Your KNN classifier performs barely better than a majority-class baseline. How would you diagnose the problem?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Your KNN classifier performs barely better than a majority-class baseline. How would you diagnose the problem? ```hint Start with the measurement Before changing the model, make sure the comparison with the baseline means what you think it means. ``` ```hint What KNN depends on A KNN prediction depends entirely on which training points count as close. List everything that decides closeness. ``` ### What a Strong Answer Covers - Checking the metric, the class balance and the validation splits before blaming the model - The model-specific causes a KNN classifier is sensitive to - A way to tell whether the features carry any signal at all, independent of KNN - A concrete check or experiment for each suspected cause ### Follow-up Questions - Scaling fixes the problem in cross-validation, but accuracy drops again in production. What would you look at? - How would you make KNN fast enough to serve predictions over a few million training rows? - Why do distances concentrate in high dimensions, and how would you see it in the neighbor lists? - When would you keep KNN even though gradient boosting scores higher?

Overview: Asks how to diagnose a k-nearest neighbors classifier that barely beats a majority-class baseline. Tests whether you check the evaluation setup first, know what KNN distances are sensitive to, and can separate a model problem from features that carry no signal.

Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

Your KNN classifier performs barely better than a majority-class baseline. How would you diagnose the problem?

What a Strong Answer Covers Guidance

  • Checking the metric, the class balance and the validation splits before blaming the model
  • The model-specific causes a KNN classifier is sensitive to
  • A way to tell whether the features carry any signal at all, independent of KNN
  • A concrete check or experiment for each suspected cause

Follow-up Questions Guidance

  • Scaling fixes the problem in cross-validation, but accuracy drops again in production. What would you look at?
  • How would you make KNN fast enough to serve predictions over a few million training rows?
  • Why do distances concentrate in high dimensions, and how would you see it in the neighbor lists?
  • When would you keep KNN even though gradient boosting scores higher?