- Calculate Euclidean distance between the test samples and each row of the train set
- Sort the distances by distance value, from lowest to highest
- Take the distance of the k smallest ones
- Take the value of target variable for these k train set rows
- Highest Count target variable is chosen
- Implementation of scikit-learn is highly optimized for performance