pulled
This commit is contained in:
commit
520f398e36
@ -8,12 +8,14 @@ LEAVES = 'action'
|
|||||||
|
|
||||||
class DecisionTree:
|
class DecisionTree:
|
||||||
|
|
||||||
|
|
||||||
def __init__(self, doCreation):
|
def __init__(self, doCreation):
|
||||||
if doCreation:
|
if doCreation:
|
||||||
return
|
return
|
||||||
with open('DecisionTree.json', 'r') as fp:
|
with open('DecisionTree.json', 'r') as fp:
|
||||||
self.tree = json.load(fp)
|
self.tree = json.load(fp)
|
||||||
|
|
||||||
|
|
||||||
def find_entropy(self,df):
|
def find_entropy(self,df):
|
||||||
Class = df.keys()[-1] # To make the code generic, changing target variable class name
|
Class = df.keys()[-1] # To make the code generic, changing target variable class name
|
||||||
entropy = 0
|
entropy = 0
|
||||||
@ -120,3 +122,5 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Engine/go_to_poligon.png
Normal file
BIN
Engine/go_to_poligon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
Loading…
Reference in New Issue
Block a user