APP下载

一种基于属性加权补集的朴素贝叶斯文本分类算法

2018-11-24陈凯黄英来高文韬赵鹏

哈尔滨理工大学学报 2018年4期

陈凯 黄英来 高文韬 赵鹏

摘 要:针对文本训练集中各个类别的样本分布不均衡时,少数类别的特征会被多数类别的特征淹没的问题,提出一种属性加权补集的朴素贝叶斯文本分类算法,该算法使用属性加权改进补集朴素贝叶斯算法,使用TFIDF算法计算特征词在当前文档中的权重;利用当前类别补集的特征表示当前类别的特征并结合特征词在文档中的权重,解决分类器容易倾向大类别而忽略小类别的问题。与传统的朴素贝叶斯及补集朴素贝叶斯算法进行对比实验,结果表明:在样本集分布不均衡时,改进算法的性能表现最优,分类准确率、召回率及Gmean性能分别可达82.92%、84.6%、88.76%。

关键词:属性加权;文本分类;朴素贝叶斯;不均衡数据集

DOI:10.15938/j.jhust.2018.04.013

中图分类号: TP391

文献标志码: A

文章编号: 1007-2683(2018)04-0069-06

Abstract:When training samples of each class are distributed unevenly and sparsely, the features of smaller class cannot be adequately expressed and submerged by lager class, to solve this problem, a new method TFWCNB(TFIDF weighted complementary Nave Bayes) algorithm was proposed for unbalanced problem. TFWCNB used weighted features to improve the complement nave Bayes and TFIDF algorithm to calculate the feature words weight in the current document; in additional, it used features of current classs complementary set to represent the features of current class,combining the feature words weight, it can solve the problem that the classifier tends to larger class and ignores the smaller class. The experimental results comparing with the traditional Nave Bayes and the complement Nave Bayes show that the TFWCNB algorithm has the best performance when the sample set is unevenly distributed, its classification precision, recall and gmean value can relatively reach 82.92%, 84.6% and 88.76%.

Keywords:feature weight; text classification; naive Bayes; unbalanced dataset

0 引 言

大多數的机器学习分类算法都是基于平衡数据集的假设,然而当数据集的各类别的样本分布不均匀时,分类器常常会倾向样本中多数类。究其原因,不均衡或是倾斜的训练样本集常会带来特征淹没的问题,从大多数类提取的特征相对丰富准确,但由少数类提取的特征相对匮乏,使其不均匀时,分类器常常会倾向样本中多数类。究其原因,不均衡或是倾斜的训练样本集常会带来特征淹没的问题,从大多数类提取的特征相对丰富准确,但由少数类提取的特征相对匮乏,使其分类能力也随之下降。

对于不平衡数据集分类问题,目前的解决办法主要有基于样本空间的改进和基于分类算法的改进两个方面。……

登录APP查看全文