K-means clustering represents an unsupervised algorithm, mainly used for clustering, while KNN is a supervised learning algorithm used for classification.
A quick answer is that each method give you difference outcome. KNN is classification (supervised task-- outcome = known class), whereas k-mean is clustering (unsupervised task-- outcome = unknown and possible relate group).
The algorithm may be overlapped depending on how you define "distance" and "neighbor"
K-means clustering represents an unsupervised algorithm, mainly used for clustering, while KNN is a supervised learning algorithm used for classification.
k-Means Clustering is an unsupervised learning algorithm that is used for clustering whereas KNN is a supervised learning algorithm used for classification.
KNN is a classification algorithm which falls under the greedy techniques however k-means is a clustering algorithm (unsupervised machine learning technique).
KNN is concerned with using the classes of neighbours as a basis for classification while k-means uses the mean value of a set of neighbouring records as a basis for clustering.
In one hand KNN represents a supervised classification algorithm. It gives new data points accordingly to the K number or the closest data points. On the other hand K-means clustering is an unsupervised clustering algorithm. It groups data into K number of clusters.
Though both techniques have certain similarities, however the difference lies in the fact that classification uses predefined classes in which objects are assigned. Clustering identifies similarities between objects, which it groups according to the similar characteristics that are common and which characteristics distinguish them from other groups of sample.
k-means is an unsupervised clustering algorithm where grouping is done simply on the basis of data values. k-nearest neighbour is a supervised classification algorithm where grouping is done based on a prior class information.
K-means is an unsupervised methodology where you choose "k" as the number of clusters you need. The data points get clustered into k number or group.
KNN or K nearest neighbor is used to classify a data point. The class label of the data point in question will be based on the class labels of it's closest k neighbours.