朴素贝叶斯方法是一种高效的分类算法,但在处理海量数据时由于内存和L/0等资源的局限,该算法的效率受到极大影响。文中针对朴素贝叶斯分类算法特点,给出了基于MapReduce编程模型的实现朴素贝叶斯分类算法的方法。训练集内文件被分割进行处理,核心处理过程由MapReduce完成,M印函数完成对训练文件的解析,Reduce函数完成类别属性和特征属性知识库的构建。实验主要比较了传统算法和改进并行算法的性能,结果表明:在大数据量的情况下使用Ma—pReduce并行化的朴素贝叶斯算法具有良好的执行效率与较高的扩展性。
Abstract:Naive Bayes is an efficient algorithm. Due to the limitation of memory and I/O resources, the efficiency of the algorithm has been greatly affected in mass data processing. In this paper,proposed a novel Naive Bayes algorithm based on MapReduce programming model. Training set is cut apart before being processed. The core processing procedure is accomplished by MapReduce model. Extraction and parsing of the training set are processed in the Map function. Knowledge base of class and feature attributes are built in the Reduce function. In the experiments, mainly compare the performance of both the traditional algorithm and the improved parallel algorithm. The result of experiments shows that the parallel Naive Bayes algorithm has good efficiency and high scalability in mass data processing.