CompTIA

DY0-001 practice question 9

CompTIA DataX · free question 9 of 20

Question

Which of the following is a key difference between KNN and k-means machine-learning techniques?
  • 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

Explanation

K-nearest neighbors is a supervised method that labels a new point by a majority vote of its k closest labeled training samples, so it is used for classification (or regression). K-means is unsupervised: it partitions unlabeled data into k clusters, each represented by a centroid. Option C reverses the two techniques, and neither algorithm is restricted to the data types or data set kinds named in A and B.

Practice the whole free set

Answer all 20 free DY0-001 questions with instant feedback, or unlock all 141 questions with Learn and Exam modes.