This commit is contained in:
Serhii Hromov 2020-06-15 11:58:49 +00:00
parent b5fd35eb8c
commit 60f168d028

View File

@ -38,11 +38,10 @@ Dane testowe jest tworzone losowo w funkcji:
### Implementacja ### Implementacja
####Drzewo: #### Drzewo:
Klasy: Klasy:
Klasa Question ##### Question
#####Question
class Queestion: class Queestion:
def __init__(self, col, value): def __init__(self, col, value):
self.col = col #column self.col = col #column
@ -53,8 +52,8 @@ Klasa Question
def __repr__(self): def __repr__(self):
#just to print #just to print
Klasa Node
#####Node ##### Node
class Decision_Node(): class Decision_Node():
#contain the question and child nodes #contain the question and child nodes
def __init__(self, quest, t_branch, f_branch): def __init__(self, quest, t_branch, f_branch):
@ -62,7 +61,7 @@ Klasa Node
self.t_branch = t_branch self.t_branch = t_branch
self.f_branch = f_branch self.f_branch = f_branch
#####Leaf ##### Leaf
class Leaf: class Leaf:
#contain a number of how many times the label has appeared in dataset #contain a number of how many times the label has appeared in dataset
def __init__(self, rows): def __init__(self, rows):