7.5.2. Math behind K-Nearest Neighbors (KNN)