Más contenido relacionado
1020NLP簡報.pptx
- 4. 大家一起夢回排列組合
Naive Bayes貝式分類器
一般郵件
● p(Dear|N)=0.47
● p(Friend|N)=0.29
● p(Lunch|N)=0.18
● p(Money|N)=0.06
假設收到一般郵件機率0.67
垃圾郵件機率
0.33
垃圾郵件
● p(Dear|S)=0.29
● p(Friend|S)=0.14
● p(Lunch|S)=0.00
● p(Money|S)=0.57
訊息:Dear Friend 是一般還
是垃圾郵件呢?
為一般郵件的可能性:
● p(N) x p(Dear|N) x p(Friend|N)=
0.67 x 0.47 x 0.29 = 0.091
為垃圾郵件的可能性:
● p(S) x p(Dear|S) x p(Friend|S)=
0.33 x 0.29 x 0.14 = 0.013
但是Dear Friend 和 Friend Dear的結
果相同,所以成為Naive