What is the main purpose of the K-nearest neighbors (K-NN) algorithm in machine learning?
A. To perform regression analysis
B. To cluster data into groups
C. To reduce dimensionality
D. To classify data points based on the majority class among their K nearest neighbors
Answer: Option D
Join The Discussion