As the previous algorithm (KMeans) is an unsupervised learning methodology, the k-nearest neighbors (KNN) algorithm is a fundamentally simple to understand supervised machine learning methodology. The concept of the KNN algorithm is described commonly as classifying data by identifying its nearest neighbor or, my favorite analogy, you can identify or classify data by identifying who it associates most with or finding its closest neighbor.
K-nearest neighbors
The Python code
As we stated earlier, our objective is to demonstrate how to implement various types of ML algorithms within IBM Watson Studio, not provide the theory behind each algorithm; in addition to that, consistent with the last section, we will utilize an existing...