Naive Bayes 朴素贝叶斯 概念解读

Naive Bayes

Naive Bayes is a probabilistic machine learning algorithm based on the Bayes Theorem, used in a wide variety of classification tasks.


Bayes Theorem
Bayes’ Theorem is a simple mathematical formula used for calculating conditional probabilities.

The formula is:
在这里插入图片描述

It tells us how often A happens given that B happens, written P(A|B), when we know how often B happens given that A happens, written P(B|A) , and how likely A and B are on their own. Naive Bayes calculates the probabilities for every factor then it selects the outcome with highest probability.


The fundamental Naive Bayes assumption is that each feature makes an independent and equal contribution to the outcome.


If we have a certain event E E E and test actors x 1 , x 2 , x 3 x1,x2,x3 x1,x2,x3, etc.

We first calculate P ( x 1 ∣ E ) , P ( x 2 ∣ E ) … P(x1| E) , P(x2 | E) … P(x1∣E),P(x2∣E) [read as probability of x1 given event E happened] and then select the test actor x x x with maximum probability value.


It is powerful algorithm used for:

  • Real time Prediction
  • Text classification/ Spam Filtering
  • Recommendation System

Advantages

  • It is not only a simple approach but also a fast and accurate method for prediction.
  • Naive Bayes has very low computation cost.
  • It can efficiently work on a large dataset.
  • It performs well in case of discrete response variable compared to the continuous variable.
  • It can be used with multiple class prediction problems.
  • It also performs well in the case of text analytics problems.
  • When the assumption of independence holds, a Naive Bayes classifier performs better compared to other models like logistic regression.

Disadvantages

  • The assumption of independent features. In practice, it is almost impossible that model will get a set of predictors which are entirely independent.
  • If there is no training tuple of a particular class, this causes zero posterior probability. In this case, the model is unable to make predictions. This problem is known as Zero Probability/Frequency Problem.

References

  1. Naive Bayes Algorithm: Everything You Need to Know
  2. Supervised Learning and Naive Bayes Classification
  3. Naive Bayes Classification Tutorial using Scikit-learn
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

hUaleeF

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值