Master the K Nearest Neighbors (KNN) Algorithm and Uncover the Mathematical Foundations of Machine Learning