Machine Learning Engineer Question:
Download Job Interview Questions and Answers PDF
Tell me how is KNN different from k-means clustering?
Answer:
K-Nearest Neighbors is a supervised classification algorithm, while k-means clustering is an unsupervised clustering algorithm. While the mechanisms may seem similar at first, what this really means is that in order for K-Nearest Neighbors to work, you need labeled data you want to classify an unlabeled point into (thus the nearest neighbor part). K-means clustering requires only a set of unlabeled points and a threshold: the algorithm will take unlabeled points and gradually learn how to cluster them into groups by computing the mean of the distance between different points.
The critical difference here is that KNN needs labeled points and is thus supervised learning, while k-means doesn’t — and is thus unsupervised learning.
The critical difference here is that KNN needs labeled points and is thus supervised learning, while k-means doesn’t — and is thus unsupervised learning.
Download Machine Learning Engineer Interview Questions And Answers
PDF
Previous Question | Next Question |
Tell us why is Naïve Bayes machine learning algorithm naïve? | Explain me what’s your favorite algorithm, and can you explain it to me in less than a minute? |