What is the purpose of the function ϕ : (X × Y) ∧ K → Y in the general form of…
2025
What is the purpose of the function ϕ : (X × Y) ∧ K → Y in the general form of the K-NN rule?
- A.
To define the similarity function
- B.
To compute the final prediction based on the K nearest neighbors
- C.
To measure the variance in the data
- D.
To reorder the training set
Attempted by 11 students.
Show answer & explanation
Correct answer: B
In the general K-NN rule, the function ∅ acts as the decision rule that aggregates information from the selected neighbors. It maps the input and neighbor data to a final output in Y, typically through majority voting for classification or averaging for regression.