Pick an algorithm and write a Pseudocode for the same?
Answer Posted / Abhishek Kumar Verma
Pseudocode for k-Nearest Neighbors (k-NN) algorithm: n1. Input training data set X and labels Y.n2. Input test data set X_test.n3. For each point in X_test:n a. Calculate distances between the point and all points in X.n b. Find k nearest neighbors.n c. Majority vote from k neighbors to predict the label.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers