In the classification analysis, the objective is to verify the existence of differences between classes according to the variables considered. This leads to the formulation of a model that can assign each sample to the class to which it belongs. If the model is obtained from a set whose classes are known (training set), the predictive power of the model itself can be verified by using another set of data (evaluation set) also with a known class. Those samples are classified according to the previously elaborated model.
Among the different types of existing classifiers, we also find the nearest neighbor, which identifies the class of belonging to a tested sample based on the distance of this from stored and classified objects. In most cases, the distance is defined as Euclidean distance between two points, calculated according...