朴素贝叶斯实现分类_关于朴素贝叶斯分类及其实现的简短教程

朴素贝叶斯实现分类

Naive Bayes classification is one of the most simple and popular algorithms in data mining or machine learning (Listed in the top 10 popular algorithms by CRC Press Reference [1]). The basic idea of the Naive Bayes classification is very simple.

朴素贝叶斯分类是数据挖掘或机器学习中最简单,最流行的算法之一(在CRC Press Reference [1]列出的十大流行算法中)。 朴素贝叶斯分类的基本思想很简单。

(In case you think video format is more suitable for you, you can jump here you can also go to the notebook.)

(如果您认为视频格式更适合您,则可以跳到此处 ,也可以转到笔记本 。)

基本直觉: (The basic Intuition:)

Let’s say, we have books of two categories. One category is Sports and the other is Machine Learning. I count the frequency of the words of “Match” (Attribute 1) and Count of the word “Algorithm” (Attribute 2). Let’s assume, I have a total of 6 books from each of these two categories and the count of words across the six books looks like the below figure.

假设我们有两类书籍。 一类是运动,另一类是机器学习。 我计算“匹配”(属性1)单词的出现频率和“算法”(属性2)单词的计数。 假设,我总共拥有这六类书中的六本书,这六本书中的单词数如下图所示。

Image for post
Figure 1: Count of words across the books
图1:书中的单词数

We see that clearly that the word ‘algorithm’ appears more in Machine Learning books and the word ‘match’ appears more in Sports. Powered with this knowledge, Let’s say if I have a book whose category is unknown. I know Attribute 1 has a value 2 and Attribute 2 has a value 10, we can say the book belongs to Sports Category.

我们清楚地看到,“算法”一词在机器学习书籍中出现的次数更多,而“匹配”一词在体育游戏中出现的次数更多。 借助这种知识,假设我有一本书的类别未知。 我知道属性1的值为2,属性2的值为10,可以说这本书属于“体育类别”。

Basically we want to find o

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值