Tell me how is knn different from k-means clustering?
Answer Posted / Jayant Sachan
KNN (k-Nearest Neighbors) and k-Means Clustering are two common machine learning algorithms, but they differ significantly in their approach to data classification. KNN is a supervised learning algorithm used for both classification and regression problems, while k-Means is an unsupervised learning algorithm used primarily for clustering. In KNN, the algorithm classifies data points based on similarity measurements (such as distance) to its k-nearest neighbors in the training dataset. On the other hand, k-Means partitions the data into distinct clusters by minimizing the sum of squared differences between each data point and its assigned cluster's centroid.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers