K-nearest neighbor (KNN) is another example of a supervised learning technique for both regression and classification tasks. KNN follows the principle of lazy learning, or instance-based learning in which the model is not trained until a query is provided in the form of the test data. Instead...