K-Nearest Neighbors based on the Nk Interaction Graph - Castro, Gustavo F. C. de; Tinós, Renato (Anais do Encontro Nacional de Inteligência Artificial e Computacional (ENIAC), 2022)
The K-Nearest Neighbors (KNN) is a simple and intuitive nonparametric classification algorithm. In KNN, the K nearest neighbors are determined according to the distance to the example to be classified. Generally, the Euclidean distance is used, which facilitates the formation of hyper-ellipsoid clusters. In this work, we propose using the Nk interaction graph to return the K-nearest neighbors in KNN. The Nk interaction graph, originally used in clustering, is built based on the distance between examples and spatial density in small groups formed by k examples of the training dataset. By using the distance combined with the spatial density, it is possible to form clusters with arbitrary shapes. We propose two variations of the KNN based on the Nk interaction graph. They differ in the way in which the vertices associated with the N examples of the training dataset are visited. The two proposed algorithms are compared to the original KNN in experiments with datasets with different properties.