Data Scientist Question:

Tell me how is kNN different from kmeans clustering?

Tweet Share WhatsApp

Answer:

Don’t get mislead by ‘k’ in their names. You should know that the fundamental difference between both these algorithms is, kmeans is unsupervised in nature and kNN is supervised in nature. kmeans is a clustering algorithm. kNN is a classification (or regression) algorithm.

kmeans algorithm partitions a data set into clusters such that a cluster formed is homogeneous and the points in each cluster are close to each other. The algorithm tries to maintain enough separability between these clusters. Due to unsupervised nature, the clusters have no labels.

Download Data Scientist PDF Read All 55 Data Scientist Questions
Previous QuestionNext Question
Tell me why is resampling done?Can you differentiate between univariate, bivariate and multivariate analysis?