基于密度函数的高斯朴素贝叶斯集成算法研究

2021-06-11 09:36:07张留决
计算机时代 2021年3期

张留决

摘  要: 本文针对数据挖掘算法中的分类问题,针对连续性数据,提出了基于密度函数的高斯朴素贝叶斯集成算法。首先假设各特征值符合正态分布,计算出各特征值的均值和方差,也就是正态分布的密度函数。然后通过定义的密度函数,计算出其概率密度函数,利用高斯朴素贝叶斯分类器得到预测结果。在对某公司实际分类问题中应用该算法,结果表明该算法的预测能力有很大程度的提升。

关键词: 密度函数; 高斯朴素贝叶斯; 集成算法; 预测能力

中图分类号:TP391          文献标识码:A     文章编号:1006-8228(2021)03-20-03

Research on Gaussian Naive Bayes ensemble algorithm based on density function

Zhang Liujue

(Fuzhou University, Fuzhou, Fujian 35000, China)

Abstract: Aiming at the classification problem in data mining algorithms, this paper proposes a Gaussian Naive Bayes ensemble algorithm based on density function for continuous data. First, assuming that each eigenvalues conforms to a normal distribution, calculate the mean and variance of each eigenvalues, which is the density function of the normal distribution. Then calculate the probability density function through the defined density function, and use the Gaussian Naive Bayes classifier to get the prediction result. The algorithm is applied to an actual classification problem of a company, and the result show that the predictive ability of the algorithm has been greatly improved.

Key words: density function; Gaussian Naive Bayes; ensemble algorithm; predictive ability

0 引言

近年來,随着数据科学的不断进步,朴素贝叶斯算法(Native Bayes,NB)被工业企业、互联网行业、证券分析领域、电子信息产业等广泛应用。朴素贝叶斯算法在数据挖掘领域得到广泛应用,此算法属于监督学习,主要用于解决算法中的分类问题。由于该算法在使用时先要假设变量(特征)值之间是相互独立的,这在一定程度上影响了该算法运用的随机性。

本文针对多个变量都是连续的问题,利用密度函数,计算出各特征的均值和方差,也就是正态分布的密度函数,然后计算出概率密度函数,融合代入高斯朴素贝叶斯分类器实现算法,实现了较好的预测效果。

1 基于密度函数的高斯朴素贝叶斯集成

1.1 贝叶斯算法的理论基础

1.1.1 条件概率

已知事件B发生的条件下,事件A发生的概率称为事件A关于事件B的条件概率,记为[P(A|B)]。对于任意事件A和B,若[P(B)≠0],则“在事件B发生的条件下事件A发生的条件概率”记为[P(A|B)],定义为:

登录APP查看全文