From 4c6710e4d88c30f20085ece7dec82e3dc09d2170 Mon Sep 17 00:00:00 2001 From: Sapna714 <33816554+Sapna714@users.noreply.github.com> Date: Mon, 25 Aug 2025 11:06:39 +0200 Subject: [PATCH 1/3] Update decision_tree.ipynb adding label for class_counts --- decision_tree.ipynb | 1 + 1 file changed, 1 insertion(+) diff --git a/decision_tree.ipynb b/decision_tree.ipynb index 07da773..116bcad 100644 --- a/decision_tree.ipynb +++ b/decision_tree.ipynb @@ -55,6 +55,7 @@ "# Column labels.\n", "# These are used only to print the tree.\n", "header = [\"color\", \"diameter\", \"label\"]" + "label = [\"color\", \"diameter\", \"label\"]" ] }, { From 452cd44babb649553d6388a58f21675842b1c71a Mon Sep 17 00:00:00 2001 From: Sapna714 <33816554+Sapna714@users.noreply.github.com> Date: Mon, 25 Aug 2025 11:07:14 +0200 Subject: [PATCH 2/3] Update decision_tree.ipynb --- decision_tree.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decision_tree.ipynb b/decision_tree.ipynb index 116bcad..c4b5842 100644 --- a/decision_tree.ipynb +++ b/decision_tree.ipynb @@ -55,7 +55,7 @@ "# Column labels.\n", "# These are used only to print the tree.\n", "header = [\"color\", \"diameter\", \"label\"]" - "label = [\"color\", \"diameter\", \"label\"]" + ] }, { From 4fd6e64837e8534153ead9e60233ff073eb32066 Mon Sep 17 00:00:00 2001 From: Sapna714 <33816554+Sapna714@users.noreply.github.com> Date: Mon, 25 Aug 2025 11:11:01 +0200 Subject: [PATCH 3/3] Update decision_tree.ipynb added label for class_counts --- decision_tree.ipynb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/decision_tree.ipynb b/decision_tree.ipynb index c4b5842..ed38446 100644 --- a/decision_tree.ipynb +++ b/decision_tree.ipynb @@ -54,7 +54,8 @@ "source": [ "# Column labels.\n", "# These are used only to print the tree.\n", - "header = [\"color\", \"diameter\", \"label\"]" + "header = [\"color\", \"diameter\", \"label\"]\n", + "label = [row[-1] for row in training_data]" ] },