K-Nearest Neighbor K最近邻

在这里插入图片描述

KNN find a k nearest examples(neighbour) and vote for its prediction.
In the picture, we want to classify green circle. If $k=3$, green circle belongs to the red triangle class. If $k=5$, green circle belongs to the blue square class.