refactor #26
@ -26,7 +26,7 @@ class Condition:
|
|||||||
return random.randint(0,max-1)
|
return random.randint(0,max-1)
|
||||||
|
|
||||||
def cycle(self):
|
def cycle(self):
|
||||||
if(self.clock==12):
|
if(self.clock==11):
|
||||||
self.currentTime=0
|
self.currentTime=0
|
||||||
self.rain=self.setRandomRain()
|
self.rain=self.setRandomRain()
|
||||||
self.temperature=self.setRandomTemperature()
|
self.temperature=self.setRandomTemperature()
|
||||||
|
@ -16,7 +16,7 @@ class Drzewo:
|
|||||||
self.tree=self.tree.fit(x.values,decision)
|
self.tree=self.tree.fit(x.values,decision)
|
||||||
|
|
||||||
def plotTree(self):
|
def plotTree(self):
|
||||||
plt.figure(figsize=(10,15))
|
plt.figure(figsize=(20,30))
|
||||||
skltree.plot_tree(self.tree,filled=True,feature_names=atributes)
|
skltree.plot_tree(self.tree,filled=True,feature_names=atributes)
|
||||||
plt.title("Drzewo decyzyjne wytrenowane na przygotowanych danych")
|
plt.title("Drzewo decyzyjne wytrenowane na przygotowanych danych")
|
||||||
plt.savefig('tree.png')
|
plt.savefig('tree.png')
|
||||||
|
Loading…
Reference in New Issue
Block a user