An Improved K-Nearest Neighbor Classifier Based on Z-Distance
Ziyin Wang, Fangrui Fan, Yiwei Si · 2023
KNN is a simple and effective algorithm for classification and regression analysis. Its non-parametric nature and ability to handle noisy data make it a popular choice for machine learning tasks. In KNN, the majority voting strategy is used to assign the class or regression value to a given data point. However, it is important to choose an appropriate value for K, as the value of K is too large to be underfitted and too small to be overfitted. This paper proposes a new classification strategy based on the Z-distance function calls improved Z-KNN (IZ-KNN). The Z-distance function takes the distances between the center points of different classes into consideration. This new feature makes the model less sensitive to the choice of K value than barely using the majority voting strategy. We conducted comparative experiments on four data sets. The result shows that the performance of IZ-KNN is better than that of Z-KNN.