From 8effe0d702508eadddb64ee029b8c134492eb210 Mon Sep 17 00:00:00 2001 From: Cezary Adamczak Date: Sun, 23 May 2021 23:16:55 +0200 Subject: [PATCH] Zaktualizuj 'id3.py' --- id3.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/id3.py b/id3.py index c40c975..d14314e 100644 --- a/id3.py +++ b/id3.py @@ -54,9 +54,6 @@ def E(cases, attribute): e = 0 values = [] index = cases[0].attributes.index(attribute) - print(attribute) - print(cases[0].values) - print(index) for case in cases: if case.values[index] not in values: values.append(case.values[index]) @@ -83,17 +80,12 @@ def treelearn(cases, attributes, default_class): t = Node(A) new_default_class = count_classes(cases) - print(attributes, end=" ") - values = [] index = attributes.index(A) - print(index) for case in cases: if case.values[index] not in values: values.append(case.values[index]) - print(values, end="") - print(A) for value in values: new_cases = [] for case in cases: