Add. Mathmetical

pull/2/head
benjas 4 years ago
parent 6ea4602100
commit 08202a296a

@ -8,3 +8,68 @@ Knowledge tree
> P(y|x)P给定x的条件下y的概率。如P(y=我招女孩子喜欢的概率|我是学生)
### 一个小故事
A story
1. 女朋友和妈妈掉河里路人拿出3颗豆两颗红豆1颗绿豆。如果我抽中红豆救女朋友抽中绿豆救妈妈。
2. 我和路人各种抽一颗,路人发现自己抽中的是绿豆,他想用剩下的那颗跟我换,我换不换?换豆和女朋友活下去的概率一样吗?
![1618406886874](assets/1618406886874.png)
**直觉来讲**
换不换豆我抽中红豆的概率应该都是1/3。这时路人跟我说他的是绿豆排除一颗我抽中红豆的概率是1/2。换不换概率都是1/2
**条件概率**
P(A|B)表示在B发生的条件下发生A的概率。
![1618409215596](assets/1618409215596.png)
计算设A表示我抽中的是红豆B表示路人抽中的是绿豆
![1618409412777](assets/1618409412777.png)
结论如果要救女朋友最好和路人交换2/3。如果要救妈最好不要换。
### 直观理解
Intuitive understanding
假设有一个手写数据集里面有100条记录分别是0-10。
此时小红写了个数字X怎么判断是数字几
朴素贝叶斯工作原理:
P(Y = 0|X) = ?, P(Y = 1|X)=? ......, P(Y = 10|X) = ?
找到概率最高的,就是对应的数字。
### 数学理解
Mathmetical
上面的数字判别公式修改为P(Y=Ck|X=x)。
![1618414407415](assets/1618414407415.png)
![1618414441014](assets/1618414441014.png)
![1618414482438](assets/1618414482438.png)
![1618414502850](assets/1618414502850.png)
![1618414581449](assets/1618414581449.png)
![1618414592721](assets/1618414592721.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Loading…
Cancel
Save