From 2699541ffc3e1f2638b15555bfe08b739cc5d134 Mon Sep 17 00:00:00 2001
From: lena-voita For each topic, you can take notebooks from
- our 7k-☆ course repo.
+ our 7.3k-☆ course repo.
From 2020, both PyTorch and Tensorflow!
Here we assume that document \(x\) is represented as a set of features, e.g., a set
of its words \((x_1, \dots, x_n)\):
- \[P(x| y=k)=P(x_1, \dots, x_n|y).\]
+ \[P(x| y=k)=P(x_1, \dots, x_n|y=k).\]
The Naive Bayes assumptions areThis new format of the course is designed for:
Seminars & Homeworks
-
+
@@ -256,7 +256,7 @@ Bonus:
Seminars & Homeworks
P(x|y=k): use the "naive" assum
P(x|y=k): use the "naive" assum
With these "naive" assumptions we get: - \[P(x| y=k)=P(x_1, \dots, x_n|y)=\prod\limits_{t=1}^nP(x_t|y=k).\] + \[P(x| y=k)=P(x_1, \dots, x_n|y=k)=\prod\limits_{t=1}^nP(x_t|y=k).\] The probabilities \(P(x_i|y=k)\) are estimated as the proportion of times the word \(x_i\) appeared in documents of class \(k\) among all tokens in these documents: