基于多项式朴素贝叶斯算法的垃圾邮件过滤器的设计与实现

2018-03-07 02:40:54李腾飞
科技资讯 2018年33期

李腾飞

摘 要:基于概率的朴素贝叶斯分类器因其算法复杂度低、分类精度高而被广泛应用于垃圾邮件过滤领域。该文在对传统朴素贝叶斯分类器进行分析的同时,结合垃圾邮件过滤的特性,设计并实现了基于多项式朴素贝叶斯算法的垃圾郵件过滤器。该过滤器引入拉普拉斯平滑因子降低合法邮件被误判为垃圾邮件的概率,得到了较好的分类效果。实验结果验证了方法的有效性。

关键词:垃圾邮件分类 多项式朴素贝叶斯 网格搜索 平滑因子

中图分类号:TP393.098 文献标识码:A 文章编号:1672-3791(2018)11(c)-0001-03

Abstract: Probability-based naive bayes classifiers are widely used in spam filtering because of their low algorithm complexity and high classification accuracy. In this paper, the traditional naive bayes classifier is analyzed, and combined with the characteristics of spam filtering, a spam filter based on polynomial naive bayes algorithm is designed and implemented. The filter introduces a Laplacian smoothing factor to reduce the probability that a legitimate mail is misjudged as spam, and a better classification effect is obtained. The experimental results verify the effectiveness of the method.

Key Words: Spam classification; Polynomial naive bayes; Grid search; Smoothing factor

随着互联网的迅速发展,网络改变了人们传统的通讯方式[1]。电子邮件因为其方便快捷而被人们广泛接受和使用。但是邮件系统的安全和可靠性依然是人们关注的焦点,尤其是垃圾邮件日益泛滥的问题更加值得我们去关注。根据中国网络不良与垃圾信息举报受理中心的数据显示,中国网民平均每周收到的垃圾邮件达12封,全国网民每年收到的垃圾邮件总计3700亿封。所以垃圾邮件严重干扰了正常的互联网秩序,研究并设计有效的垃圾邮件过滤器具有非常重要的现实意义。

白名单、行为监控、黑名单以及关键字过滤等是目前常用的垃圾邮件过滤技术,但这些过滤技术缺乏自适应性,面对内容多变的垃圾邮件其过滤效果不够理想。针对这一问题,面向内容的多项式朴素贝叶斯过滤器不仅具有自适应性[2],而且也可以根据用户需求进行个性化过滤,加之其算法复杂度低、分类精度高,故而被广泛使用。……

登录APP查看全文