Notes - Machine Learning MT23, k-nearest neighbours
Flashcards
Suppose we have data $\langle \pmb x _ i, y _ i \rangle$ which classifies data into classes $y _ i \in \{1, \cdots, N\}$. How does $k$-nearest neighbours then classify a new point $\pmb x _ \text{new}$?
- Find the $k$ nearest neighbours to $\pmb x _ \text{new}$
- Output the majority among the labels for these points
How does $k$-means differ from $k$-nearest neighbours?
They are used for very different purposes. $k$-means is a clustering algorithm, whereas $k$-nearest neighbours is a classification algorithm.