In the realm of machine learning, the KNN classification algorithm is widely recognized for its simplicity and efficiency. However, its sensitivity to the K value poses challenges, especially with small sample sizes or outliers, impacting classification performance. This article introduces a novel KNN-based classifier called LMPHNN (Novel Pseudo Nearest Neighbor Classification Method Using Local Harmonic Mean Distance). LMPHNN leverages harmonic mean distance (HMD) to improve classification performance based on LMPNN rules and HMD. The classifier begins by identifying k nearest neighbors for each class and generates distinct local vectors as prototypes. Pseudo nearest neighbors (PNNs) are then created based on the local mean for each class, determined by comparing the HMD of the sample with the initial k group. Classification is determined by calculating the Euclidean distance between the query sample and PNNs, based on the local mean of these categories. Extensive experiments on various real UCI datasets and combined datasets compare LMPHNN with seven KNN-based classifiers, using precision, recall, accuracy, and F1 as evaluation metrics. LMPHNN achieves an average precision of 97%, surpassing other methods by 14%. The average recall improves by 12%, with an average accuracy enhancement of 5%. Additionally, LMPHNN demonstrates a 13% higher average F1 value compared to other methods. In summary, LMPHNN outperforms other classifiers, showcasing lower sensitivity with small sample sizes.
翻译:在机器学习领域,KNN分类算法因其简洁性和高效性而广受认可。然而,其对K值的敏感性带来挑战,尤其在样本量较小或存在异常值时,会影响分类性能。本文提出一种基于KNN的新型分类器LMPHNN(基于局部调和平均距离的新型伪最近邻分类方法)。LMPHNN利用调和平均距离(HMD)来改进基于LMPNN规则和HMD的分类性能。该分类器首先为每个类别确定k个最近邻,并生成不同的局部向量作为原型。随后,基于各类别局部均值构建伪最近邻(PNNs),通过比较样本与初始k组的HMD来确定。分类决策通过计算查询样本与基于这些类别局部均值的PNNs之间的欧几里得距离实现。在多个真实UCI数据集及组合数据集上的广泛实验中,以精确率、召回率、准确率和F1值为评估指标,将LMPHNN与七种基于KNN的分类器进行比较。LMPHNN的平均精确率达97%,比其他方法高出14%;平均召回率提升12%,平均准确率提升5%。此外,LMPHNN的平均F1值比其他方法高出13%。综上所述,LMPHNN优于其他分类器,在小样本量情况下表现出更低的敏感性。