CompTIA DataX (DY0-001) — Question 9
Which of the following is a key difference between KNN and k-means machine-learning techniques?
Answer options
- A. KNN operates exclusively on continuous data, while k-means can work with both continuous and categorical data.
- B. KNN performs better with longitudinal data sets, while k-means performs better with survey data sets.
- C. KNN is used for finding centroids, while k-means is used for finding nearest neighbors.
- D. KNN is used for classification, while k-means is used for clustering.
Correct answer: D
Explanation
The correct answer is D because KNN (K-Nearest Neighbors) is primarily a classification algorithm that assigns labels to data points based on their nearest neighbors, while k-means is a clustering algorithm that groups data points into clusters based on their features. The other options incorrectly describe the functionalities and applications of each method.