计算机工程与应用 ›› 2011, Vol. 47 ›› Issue (28): 143-145.

• 数据库、信号与信息处理 • 上一篇    下一篇

用于不均衡数据集分类的KNN算法

孙晓燕,张化祥,计 华   

  1. 山东师范大学 信息科学与工程学院,济南 250014
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2011-10-01 发布日期:2011-10-01

Improved KNN algorithm in classification of imbalanced data sets

SUN Xiaoyan,ZHANG Huaxiang,JI Hua   

  1. Department of Information Science and Engineering,Shandong Normal University,Jinan 250014,China
  • Received:1900-01-01 Revised:1900-01-01 Online:2011-10-01 Published:2011-10-01

摘要: 针对KNN在处理不均衡数据集时,少数类分类精度不高的问题,提出了一种改进的算法G-KNN。该算法对少数类样本使用交叉算子和变异算子生成部分新的少数类样本,若新生成的少数类样本到父代样本的欧几里德距离小于父代少数类之间的最大距离,则认为是有效样本,并把这类样本加入到下轮产生少数类的过程中。在UCI数据集上进行测试,实验结果表明,该方法与KNN算法中应用随机抽样相比,在提高少数类的分类精度方面取得了较好的效果。

关键词: 不均衡数据集, K最近邻居(KNN)算法, 过抽样, 交叉算子

Abstract: When the KNN algorithm is used to deal with imbalanced data sets,it has poor performance in the minority class prediction accuracy.An improved algorithm(G-KNN) is proposed to solve this problem.For the minority class samples,this algorithm uses the crossover operator and mutation operator to generate some of the new minority class samples.One new sample is considered valid,only if its Euclidean distance to parent is less than the maximum distance between parents.Then this valid sample is used to product the minority class samples in the next round of the process.The experimental results,which are tested on the UCI data sets,show that this algorithm is superior to KNN algorithm in the application of random over-sampling in improving the classification accuracy of the minority class.

Key words: imbalanced data sets, K-Nearest Neighbor(KNN) algorithm, over-sampling, crossover