Skip to content

Commit 0ed97d2

Browse files
committed
minor edits
1 parent 2cd7a15 commit 0ed97d2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

notebooks/18_machine_learning_algorithms_3.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@
8181
"We here compare two possible splits (x > 3 or x > 3.5) to decide which one is better based on the Gini index. \n",
8282
"```\n",
8383
"\n",
84-
"The Gini index at the root is\n",
84+
"The Gini index at the beginning (in the \"parent\" node) is\n",
8585
"\n",
8686
"$$\n",
87-
"Gini_{root}=1 - (0.5^2 + 0.5^2)=0.5\n",
87+
"G_{parent}=1 - (0.5^2 + 0.5^2)=0.5\n",
8888
"$$\n",
8989
"\n",
9090
"Consider two candidate splits on feature x:\n",
@@ -101,7 +101,7 @@
101101
"Gini_R = 1 - (\\frac{2}{5}^2 + \\frac{8}{15}^2) ≈ 0.498\n",
102102
"$$\n",
103103
"\n",
104-
"The weighted impurity after Split A is\n",
104+
"The weighted sum of both $Gini_L$ and $Gini_R$ after Split A is\n",
105105
"\n",
106106
"$$\n",
107107
"G_A = \\tfrac{5}{20}\\times0.48 + \\tfrac{15}{20}\\times0.498 \\approx 0.493\n",

0 commit comments

Comments
 (0)