K-nearest neighbors (KNN) is a simple and intuitive machine learning algorithm that can be used for classification and regression tasks ... distance or similarity between instances, such as ...