Compactness-Weighted KNN Classification Algorithm
Bengting Wan, Zhixiang Sheng, Wenqiang Zhu, Zhiyi Hu · International Journal of Advanced Computer Science and Applications · 2024
The K-Nearest Neighbor (KNN) algorithm is a widely used classical classification tool, yet enhancing the classification ac-curacy for multi-feature large datasets remains a challenge. The paper introduces a Compactness-Weighted KNN classification algorithm using a weighted Minkowski distance (CKNN) to address this. Due to the variability in sample distribution, a method for deriving feature weights based on compactness is designed. Subsequently, a formula for calculating the weighted Minkowski distance using compactness weights is proposed, forming the basis for developing the CKNN algorithm. Com-parative experimental results on five real-world datasets demonstrate that the CKNN algorithm outperforms eight exist-ing variant KNN algorithms in Accuracy, Precision, Recall, and F1 performance metrics. The test results and sensitivity analysis confirm the CKNN's efficacy in classifying multi-feature da-tasets.