Skip to content

Commit aad7560

Browse files
committed
updated nb notebook2
1 parent 53806c5 commit aad7560

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

projects/practice_projects/naive_bayes_tutorial/Naive_Bayes_tutorial.ipynb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,14 +1203,14 @@
12031203
"\n",
12041204
"Let's say that we have two political parties' candidates, 'Jill Stein' of the Green Party and 'Gary Johnson' of the Libertarian Party and we have the probabilities of each of these candidates saying the words 'freedom', 'immigration' and 'environment' when they give a speech:\n",
12051205
"\n",
1206-
"* Probability that Jill Stein says 'freedom': 0.1 ---------> `P(J|F)`\n",
1207-
"* Probability that Jill Stein says 'immigration': 0.1 -----> `P(J|I)`\n",
1208-
"* Probability that Jill Stein says 'environment': 0.8 -----> `P(J|E)`\n",
1206+
"* Probability that Jill Stein says 'freedom': 0.1 ---------> `P(F|J)`\n",
1207+
"* Probability that Jill Stein says 'immigration': 0.1 -----> `P(I|J)`\n",
1208+
"* Probability that Jill Stein says 'environment': 0.8 -----> `P(E|J)`\n",
12091209
"\n",
12101210
"\n",
1211-
"* Probability that Gary Johnson says 'freedom': 0.7 -------> `P(G|F)`\n",
1212-
"* Probability that Gary Johnson says 'immigration': 0.2 ---> `P(G|I)`\n",
1213-
"* Probability that Gary Johnson says 'environment': 0.1 ---> `P(G|E)`\n",
1211+
"* Probability that Gary Johnson says 'freedom': 0.7 -------> `P(F|G)`\n",
1212+
"* Probability that Gary Johnson says 'immigration': 0.2 ---> `P(I|G)`\n",
1213+
"* Probability that Gary Johnson says 'environment': 0.1 ---> `P(E|G)`\n",
12141214
"\n",
12151215
"\n",
12161216
"And let us also assume that the probablility of Jill Stein giving a speech, `P(J)` is `0.5` and the same for Gary Johnson, `P(G) = 0.5`. \n",
@@ -1285,10 +1285,10 @@
12851285
"# P(J)\n",
12861286
"p_j = 0.5\n",
12871287
"\n",
1288-
"# P(J|F)\n",
1288+
"# P(F/J)\n",
12891289
"p_j_f = 0.1\n",
12901290
"\n",
1291-
"# P(J|I)\n",
1291+
"# P(I/J)\n",
12921292
"p_j_i = 0.1\n",
12931293
"\n",
12941294
"p_j_text = p_j * p_j_f * p_j_i\n",
@@ -1317,10 +1317,10 @@
13171317
"# P(G)\n",
13181318
"p_g = 0.5\n",
13191319
"\n",
1320-
"# P(G|F)\n",
1320+
"# P(F/G)\n",
13211321
"p_g_f = 0.7\n",
13221322
"\n",
1323-
"# P(G|I)\n",
1323+
"# P(I/G)\n",
13241324
"p_g_i = 0.2\n",
13251325
"\n",
13261326
"p_g_text = p_g * p_g_f * p_g_i\n",

0 commit comments

Comments
 (0)