Decision_trees #3

Merged
s481838 merged 3 commits from Decision_trees into master 2024-05-20 23:11:52 +02:00
9 changed files with 405 additions and 10 deletions

View File

@ -4,7 +4,7 @@
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.9" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Python 3.10 (Traktor)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9" project-jdk-type="Python SDK" />
</project>

45
source/decision_tree.py Normal file
View File

@ -0,0 +1,45 @@
import pandas as pd
from sklearn.model_selection import train_test_split
import joblib
from sklearn.tree import DecisionTreeClassifier, plot_tree
import matplotlib.pyplot as plt
dtype_dict = {
'season': str,
'anomalies': bool,
'weather': str,
'temp': int,
'water': int,
'nutri': int,
'pests': int,
'weeds': int,
'type': str,
'ripeness': int,
'target_column': str
}
# Wczytaj dane z pliku CSV
data = pd.read_csv('resources/dataset.csv', header=0, dtype=dtype_dict)
#print(data)
X = data.drop('target_column', axis=1)
y = data['target_column']
X = pd.get_dummies(X)
# X.to_csv('model_data1.csv', index=False)
# Podział danych na zbiór treningowy i testowy
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
# Dopasowanie modelu drzewa decyzyjnego
model = DecisionTreeClassifier()
model.fit(X_train, y_train)
fig = plt.figure(figsize=(25, 20))
_ = plot_tree(model, feature_names=X.columns, class_names=model.classes_, filled=True)
plt.savefig('drzewo_decyzyjne.png')
plt.show()
# 'model' to wcześniej wytrenowany model drzewa decyzyjnego
joblib.dump(model, 'model.pkl')

BIN
source/drzewo_decyzyjne.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

View File

@ -12,7 +12,7 @@ class Dirt:
# add a couple new properties
def pests_and_weeds(self):
i = random.randint(1, 20) # 5% szans na szkodniki, 10% na chwasty, 5 na obydwa 15 na kamien
i = random.randint(1, 20) # 5% szans na szkodniki, 10% na chwasty, 5 na obydwa 5 na kamien
if i == 1:
self.pest = True
elif i == 2 or i == 3:

View File

@ -1,6 +1,8 @@
import pygame
import time
import random
import pandas as pd
import joblib
from area.constants import WIDTH, HEIGHT, TILE_SIZE
from area.field import drawWindow
@ -68,6 +70,54 @@ def main():
d1 = Dirt(random.randint(1, 100), random.randint(1,100))
d1.pests_and_weeds()
tile1.ground=d1
if d1.pest:
pe = 1
else:
pe = 0
if d1.weed:
we = 1
else:
we = 0
if p1.plant_type == 'cereal':
t1 = True
t2 = False
t3 = False
t4 = False
else:
t1 = False
if p1.plant_type == 'fruit':
t2 = True
t3 = False
t4 = False
else:
t2 = False
if p1.plant_type == 'vegetable':
t4 = True
t3 = False
else:
t3 = True
t4 = False
dane = {
'anomalies': [True],
'temp': [17],
'water': [d1.water_level],
'nutri': [d1.nutrients_level],
'pests': [pe],
'weeds': [we],
'ripeness': [p1.growth_level],
'season_autumn': [True], 'season_spring': [False], 'season_summer': [False], 'season_winter': [False],
'weather_heavyCloudy': [False], 'weather_partCloudy': [False], 'weather_precipitation': [False],
'weather_sunny': [True],
'type_cereal': [t1], 'type_fruit': [t2], 'type_none': [t3], 'type_vegetable': [t4]
}
df = pd.DataFrame(dane)
df.to_csv('model_data.csv', index=False)
model = joblib.load('model.pkl')
nowe_dane = pd.read_csv('model_data.csv')
predykcje = model.predict(nowe_dane)
# movement based on route-planning (test):
@ -75,7 +125,8 @@ def main():
time.sleep(1)
if moves != False:
do_actions(tractor, WIN, moves)
print(predykcje)
if predykcje == 'work':
tractor.work_on_field(tile1, d1, p1)
time.sleep(30)
print("\n")

BIN
source/model.pkl Normal file

Binary file not shown.

2
source/model_data.csv Normal file
View File

@ -0,0 +1,2 @@
anomalies,temp,water,nutri,pests,weeds,ripeness,season_autumn,season_spring,season_summer,season_winter,weather_heavyCloudy,weather_partCloudy,weather_precipitation,weather_sunny,type_cereal,type_fruit,type_none,type_vegetable
True,17,32,2,0,0,54,True,False,False,False,False,False,False,True,True,False,False,False
1 anomalies temp water nutri pests weeds ripeness season_autumn season_spring season_summer season_winter weather_heavyCloudy weather_partCloudy weather_precipitation weather_sunny type_cereal type_fruit type_none type_vegetable
2 True 17 32 2 0 0 54 True False False False False False False True True False False False

View File

@ -0,0 +1,301 @@
season,anomalies,weather,temp,water,nutri,pests,weeds,type,ripeness,target_column
winter,False,precipitation,5,44,17,1,0,vegetable,76,doNothing
spring,False,heavyCloudy,12,22,83,0,0,cereal,83,work
summer,False,sunny,25,85,84,0,0,cereal,85,work
summer,False,precipitation,24,24,67,0,0,none,0,work
spring,False,sunny,4,44,35,1,0,vegetable,96,work
summer,False,partCloudy,33,78,54,0,1,cereal,89,work
winter,False,heavyCloudy,-1,27,87,1,1,cereal,1,doNothing
autumn,True,sunny,15,45,99,1,1,cereal,49,doNothing
autumn,False,partCloudy,20,54,81,0,1,none,0,work
winter,False,heavyCloudy,-5,50,49,0,1,fruit,42,doNothing
summer,False,heavyCloudy,35,95,31,1,1,none,0,work
summer,False,partCloudy,36,14,42,0,1,vegetable,96,work
summer,False,precipitation,31,62,45,1,0,vegetable,3,work
summer,True,precipitation,35,35,41,1,0,none,0,doNothing
summer,True,heavyCloudy,35,33,97,0,0,fruit,76,work
autumn,False,sunny,3,24,62,1,1,vegetable,21,work
winter,False,partCloudy,-18,80,37,0,0,cereal,24,doNothing
spring,True,precipitation,21,15,58,1,0,fruit,49,doNothing
autumn,False,precipitation,16,62,75,1,0,fruit,69,work
winter,False,heavyCloudy,-11,69,9,0,1,none,0,doNothing
autumn,False,sunny,21,6,24,0,0,vegetable,99,work
summer,False,heavyCloudy,23,1,33,0,0,none,0,work
autumn,False,sunny,18,80,42,0,0,vegetable,47,work
summer,False,partCloudy,35,69,38,1,0,vegetable,40,work
summer,False,heavyCloudy,27,98,34,0,1,vegetable,20,work
winter,False,heavyCloudy,-3,9,3,0,1,none,0,doNothing
summer,False,heavyCloudy,26,79,28,1,0,fruit,20,work
spring,False,precipitation,3,9,53,0,1,vegetable,30,doNothing
autumn,False,sunny,6,31,1,1,0,fruit,31,work
autumn,False,sunny,8,2,70,1,0,vegetable,54,work
spring,False,precipitation,8,21,1,1,0,fruit,92,doNothing
autumn,False,heavyCloudy,11,4,32,1,1,fruit,63,work
winter,True,precipitation,-10,57,67,1,1,cereal,43,doNothing
winter,False,precipitation,-13,90,14,1,1,fruit,29,doNothing
autumn,True,precipitation,10,68,46,0,0,fruit,18,doNothing
spring,False,heavyCloudy,8,41,55,1,1,fruit,12,work
winter,False,heavyCloudy,-10,24,25,0,0,vegetable,32,doNothing
spring,False,heavyCloudy,0,40,6,0,0,none,0,work
autumn,False,sunny,22,7,88,0,1,vegetable,71,work
spring,True,precipitation,0,56,21,0,0,cereal,46,doNothing
autumn,False,sunny,13,37,49,0,1,vegetable,94,work
summer,False,precipitation,20,14,39,0,0,cereal,97,work
autumn,False,heavyCloudy,18,74,38,1,0,vegetable,32,work
autumn,False,heavyCloudy,2,100,70,0,0,none,0,work
autumn,False,precipitation,19,30,16,0,1,cereal,17,work
summer,False,sunny,26,94,83,1,1,fruit,25,work
autumn,False,heavyCloudy,14,91,62,0,0,vegetable,25,work
autumn,False,partCloudy,12,34,98,0,0,none,0,work
spring,True,heavyCloudy,5,64,50,0,0,vegetable,31,doNothing
summer,True,heavyCloudy,30,60,55,0,0,none,0,doNothing
summer,False,sunny,22,35,2,0,1,vegetable,20,work
spring,False,sunny,21,87,22,0,1,cereal,45,work
winter,False,heavyCloudy,-2,48,83,0,1,vegetable,3,doNothing
winter,False,heavyCloudy,-15,55,6,0,1,none,0,doNothing
summer,False,heavyCloudy,35,5,68,1,0,vegetable,79,work
summer,True,heavyCloudy,35,99,35,1,0,fruit,79,doNothing
winter,False,sunny,-1,35,57,1,0,vegetable,80,doNothing
summer,True,precipitation,31,55,73,0,1,vegetable,24,doNothing
autumn,True,precipitation,21,26,84,0,0,vegetable,49,doNothing
winter,False,precipitation,-8,13,30,1,0,none,0,doNothing
autumn,False,heavyCloudy,20,58,15,1,0,cereal,56,work
spring,False,partCloudy,12,25,61,1,1,vegetable,11,work
winter,False,partCloudy,-14,58,54,0,1,none,0,doNothing
autumn,False,sunny,6,4,96,1,0,cereal,42,work
summer,False,sunny,29,74,98,0,1,vegetable,22,work
summer,False,sunny,32,83,90,1,0,none,0,work
summer,True,sunny,33,11,11,0,1,fruit,45,work
spring,False,sunny,3,54,13,1,1,none,0,work
autumn,False,heavyCloudy,20,67,97,0,0,cereal,68,doNothing
spring,False,sunny,5,35,54,0,0,vegetable,37,work
summer,False,precipitation,31,44,68,1,0,vegetable,9,work
winter,False,heavyCloudy,-11,59,18,1,1,cereal,11,doNothing
summer,False,precipitation,30,32,57,1,1,fruit,18,work
summer,False,sunny,27,31,54,0,1,vegetable,67,work
summer,False,precipitation,29,70,73,1,0,fruit,71,work
spring,False,sunny,18,67,22,1,0,fruit,64,work
spring,False,partCloudy,13,40,18,1,0,fruit,7,work
summer,False,precipitation,23,24,6,1,0,vegetable,90,work
autumn,False,heavyCloudy,1,59,84,0,0,none,0,work
spring,False,precipitation,2,47,99,0,0,vegetable,83,doNothing
summer,False,precipitation,32,9,94,1,0,cereal,18,work
winter,False,partCloudy,-14,56,74,1,1,fruit,24,doNothing
winter,False,sunny,-5,100,55,0,0,cereal,57,doNothing
summer,False,sunny,30,99,99,1,1,cereal,31,work
winter,True,precipitation,-13,56,58,1,0,none,0,doNothing
spring,False,precipitation,1,24,21,1,1,none,0,work
spring,False,heavyCloudy,2,38,56,0,0,fruit,9,work
winter,False,partCloudy,-7,60,71,0,0,cereal,70,doNothing
autumn,False,precipitation,2,71,2,0,1,cereal,26,doNothing
autumn,False,sunny,19,99,7,1,1,none,0,work
spring,False,sunny,8,41,35,0,1,vegetable,89,work
winter,False,sunny,-14,58,94,0,1,vegetable,29,doNothing
summer,True,precipitation,30,3,58,1,0,none,0,doNothing
winter,False,precipitation,8,17,76,1,0,vegetable,47,doNothing
spring,True,precipitation,20,38,65,0,1,cereal,49,doNothing
winter,False,partCloudy,-4,8,10,0,1,cereal,74,doNothing
autumn,False,sunny,2,100,7,1,1,none,0,work
autumn,False,partCloudy,17,88,89,0,1,vegetable,17,work
autumn,False,partCloudy,16,76,54,1,0,vegetable,98,work
spring,False,sunny,2,14,25,0,1,vegetable,8,work
spring,False,precipitation,5,34,1,1,0,none,0,work
autumn,False,heavyCloudy,9,20,28,0,0,cereal,88,work
autumn,False,heavyCloudy,20,17,84,0,0,cereal,15,work
winter,False,heavyCloudy,-18,43,33,0,1,cereal,31,doNothing
autumn,False,partCloudy,2,1,3,1,1,cereal,86,work
summer,False,heavyCloudy,34,58,23,0,0,cereal,27,work
summer,False,precipitation,31,22,14,0,1,fruit,33,work
winter,False,sunny,-5,98,51,1,0,none,0,doNothing
winter,False,precipitation,-17,74,78,1,0,none,0,doNothing
summer,False,precipitation,29,3,54,0,0,none,0,work
autumn,False,precipitation,7,45,29,1,1,cereal,52,doNothing
spring,False,sunny,7,21,30,0,1,fruit,38,work
summer,False,heavyCloudy,28,73,75,1,1,none,0,work
summer,False,heavyCloudy,32,49,43,0,0,vegetable,74,work
autumn,True,precipitation,0,99,66,0,0,none,0,doNothing
summer,True,partCloudy,32,46,99,0,1,none,0,work
autumn,False,heavyCloudy,21,26,44,1,0,none,0,work
summer,True,precipitation,30,28,89,1,1,cereal,65,doNothing
autumn,False,heavyCloudy,20,100,46,1,0,fruit,25,work
winter,False,partCloudy,-3,78,63,1,0,vegetable,18,doNothing
spring,False,partCloudy,22,8,86,1,1,none,0,work
winter,False,partCloudy,2,34,30,1,0,fruit,95,doNothing
summer,True,partCloudy,31,35,26,0,0,fruit,3,work
winter,False,partCloudy,9,80,24,1,1,vegetable,67,doNothing
winter,False,heavyCloudy,-19,85,14,1,1,vegetable,33,doNothing
autumn,False,partCloudy,3,15,6,0,0,vegetable,11,work
winter,False,partCloudy,10,20,62,1,1,fruit,90,doNothing
autumn,False,precipitation,11,93,90,1,0,vegetable,87,work
summer,False,partCloudy,22,79,60,1,1,none,0,work
winter,True,precipitation,-6,55,88,1,0,vegetable,64,doNothing
winter,False,precipitation,-13,31,62,0,1,fruit,70,doNothing
autumn,False,precipitation,20,90,2,1,1,fruit,73,work
winter,False,heavyCloudy,9,100,76,1,1,cereal,41,doNothing
summer,False,partCloudy,30,8,90,1,1,cereal,15,work
winter,False,heavyCloudy,4,27,77,1,1,vegetable,99,doNothing
summer,False,partCloudy,33,67,34,0,0,cereal,44,work
summer,True,precipitation,34,28,100,1,0,vegetable,64,work
winter,True,precipitation,-9,34,88,1,1,cereal,5,doNothing
spring,False,heavyCloudy,10,33,54,1,0,fruit,63,work
spring,False,precipitation,0,77,32,0,0,fruit,100,doNothing
autumn,False,sunny,3,7,59,1,0,cereal,62,work
winter,False,heavyCloudy,-2,50,37,0,0,vegetable,51,doNothing
summer,False,partCloudy,33,74,88,1,1,fruit,49,work
spring,False,sunny,14,14,29,1,1,none,0,work
summer,False,heavyCloudy,24,98,18,1,0,vegetable,99,work
winter,False,heavyCloudy,-15,52,38,0,1,vegetable,66,doNothing
spring,True,partCloudy,9,62,24,0,1,fruit,67,doNothing
spring,False,precipitation,2,87,100,1,0,vegetable,39,doNothing
spring,False,precipitation,16,94,45,0,0,vegetable,35,work
winter,False,precipitation,5,41,82,0,1,fruit,80,doNothing
spring,False,partCloudy,13,49,4,1,0,cereal,97,work
winter,False,partCloudy,-17,24,42,1,1,fruit,71,doNothing
spring,False,heavyCloudy,20,45,71,1,1,vegetable,58,work
winter,False,precipitation,-8,78,81,1,1,fruit,8,doNothing
spring,False,partCloudy,5,31,82,0,1,fruit,18,work
autumn,False,sunny,6,75,85,0,0,fruit,18,doNothing
spring,False,precipitation,14,9,1,1,0,none,0,work
winter,False,heavyCloudy,2,37,5,1,1,cereal,1,doNothing
summer,False,precipitation,20,44,28,1,1,none,0,work
winter,False,partCloudy,-4,97,90,1,1,vegetable,94,doNothing
summer,True,precipitation,26,46,55,1,0,cereal,91,doNothing
spring,False,sunny,15,97,67,1,1,none,0,work
summer,False,partCloudy,33,40,14,1,0,none,0,work
spring,False,partCloudy,4,23,51,0,0,vegetable,8,work
summer,False,sunny,20,66,76,1,1,vegetable,71,work
winter,False,sunny,-11,2,98,0,1,vegetable,29,doNothing
spring,False,sunny,9,67,74,0,0,none,0,work
autumn,False,precipitation,17,23,94,1,1,none,0,work
autumn,False,heavyCloudy,22,65,69,0,1,fruit,79,work
winter,False,heavyCloudy,-2,35,82,1,1,cereal,20,doNothing
winter,True,heavyCloudy,-10,1,73,1,0,fruit,77,doNothing
autumn,False,sunny,4,58,71,1,1,fruit,94,work
summer,False,sunny,32,44,20,1,1,vegetable,48,work
summer,False,heavyCloudy,31,68,37,1,0,cereal,42,work
winter,False,heavyCloudy,-1,69,34,0,0,none,0,doNothing
spring,False,heavyCloudy,10,27,43,1,1,vegetable,49,work
summer,False,partCloudy,26,86,12,0,1,none,0,work
winter,True,precipitation,5,62,62,1,1,cereal,85,doNothing
winter,False,partCloudy,9,29,83,1,0,vegetable,14,doNothing
spring,False,sunny,8,22,33,0,1,cereal,23,work
summer,False,partCloudy,34,38,2,1,1,fruit,29,work
autumn,False,heavyCloudy,2,65,91,1,1,vegetable,49,work
spring,False,sunny,3,73,32,0,0,fruit,61,work
spring,False,precipitation,7,68,70,0,0,none,0,work
winter,False,partCloudy,10,68,2,0,0,cereal,80,doNothing
winter,False,precipitation,-16,89,7,0,0,fruit,92,doNothing
winter,False,precipitation,0,31,49,0,1,cereal,18,doNothing
spring,False,heavyCloudy,7,44,86,1,1,none,0,work
summer,False,sunny,24,1,75,0,1,none,0,work
summer,True,heavyCloudy,39,3,100,1,0,cereal,30,work
winter,False,heavyCloudy,2,88,69,1,1,cereal,79,doNothing
spring,False,heavyCloudy,16,100,21,0,1,cereal,57,work
autumn,True,heavyCloudy,1,17,62,0,1,cereal,92,doNothing
autumn,False,sunny,1,69,54,0,0,cereal,62,work
autumn,False,sunny,17,62,84,0,1,vegetable,18,work
summer,False,heavyCloudy,24,57,84,0,1,vegetable,1,work
spring,False,partCloudy,8,80,61,0,0,none,0,work
autumn,False,heavyCloudy,1,93,79,0,0,fruit,62,work
winter,False,sunny,-4,51,33,1,0,none,0,doNothing
autumn,False,precipitation,4,51,73,1,1,fruit,57,doNothing
autumn,True,heavyCloudy,5,88,81,0,1,fruit,25,doNothing
summer,False,precipitation,30,26,45,0,0,none,0,work
winter,False,partCloudy,3,88,46,1,0,none,0,doNothing
autumn,False,heavyCloudy,8,20,34,0,1,fruit,62,work
spring,False,partCloudy,15,34,33,0,0,vegetable,16,work
winter,False,heavyCloudy,-20,80,25,1,0,vegetable,45,doNothing
spring,False,precipitation,6,34,78,1,0,cereal,6,doNothing
spring,True,heavyCloudy,3,97,65,1,0,fruit,21,doNothing
summer,False,precipitation,34,49,65,1,0,vegetable,10,work
summer,True,precipitation,26,29,2,0,0,cereal,56,doNothing
autumn,False,partCloudy,10,3,19,0,0,vegetable,67,work
spring,False,sunny,19,60,71,0,1,cereal,5,work
winter,False,partCloudy,5,11,66,0,0,none,0,doNothing
winter,False,heavyCloudy,-13,86,29,1,1,cereal,98,doNothing
summer,False,precipitation,33,19,2,1,1,cereal,78,work
spring,False,precipitation,13,6,40,0,0,cereal,49,work
summer,False,partCloudy,31,15,70,1,0,cereal,100,work
spring,False,heavyCloudy,8,40,1,0,0,cereal,83,work
spring,False,partCloudy,10,77,95,1,1,fruit,85,work
spring,False,partCloudy,3,96,32,1,1,fruit,16,work
winter,False,sunny,-11,24,5,1,0,none,0,doNothing
summer,True,heavyCloudy,34,14,11,0,0,vegetable,36,doNothing
summer,True,precipitation,34,69,54,1,0,none,0,doNothing
spring,True,precipitation,21,92,44,0,0,fruit,34,doNothing
spring,False,sunny,10,58,14,1,1,none,0,work
spring,False,partCloudy,9,22,68,0,0,vegetable,85,work
winter,False,precipitation,-20,62,18,0,1,vegetable,78,doNothing
spring,False,sunny,10,51,7,1,1,none,0,work
autumn,True,heavyCloudy,19,89,2,1,0,cereal,6,doNothing
winter,False,heavyCloudy,-6,99,10,0,1,fruit,70,doNothing
spring,False,sunny,2,84,49,1,0,none,0,work
summer,False,heavyCloudy,27,11,32,0,1,cereal,22,work
summer,False,partCloudy,27,55,39,1,1,none,0,work
winter,False,heavyCloudy,-13,53,1,1,1,none,0,doNothing
summer,False,partCloudy,27,15,78,1,1,cereal,43,work
winter,False,partCloudy,-4,79,5,0,0,vegetable,1,doNothing
winter,False,sunny,-1,6,31,0,0,fruit,13,doNothing
summer,True,precipitation,31,86,32,0,1,fruit,98,doNothing
winter,False,precipitation,-2,96,89,1,1,cereal,57,doNothing
spring,False,sunny,18,28,92,1,0,fruit,20,work
summer,False,precipitation,27,90,37,1,0,cereal,55,work
summer,False,heavyCloudy,32,41,3,0,0,cereal,35,work
autumn,False,precipitation,2,31,90,1,0,cereal,7,doNothing
winter,False,partCloudy,-9,74,28,1,1,fruit,72,doNothing
summer,False,partCloudy,23,8,99,0,1,none,0,work
spring,False,heavyCloudy,8,85,29,0,0,none,0,work
winter,False,sunny,-6,67,100,1,1,fruit,25,doNothing
winter,False,partCloudy,10,88,85,1,1,cereal,68,doNothing
spring,False,sunny,20,99,73,0,0,vegetable,18,work
spring,False,sunny,12,52,22,0,0,none,0,work
winter,False,sunny,-18,16,57,0,0,vegetable,69,doNothing
winter,False,partCloudy,-13,17,10,0,0,vegetable,93,doNothing
summer,False,partCloudy,23,18,24,0,1,fruit,7,work
spring,False,partCloudy,2,50,95,1,1,vegetable,49,work
summer,False,partCloudy,23,51,40,1,0,none,0,work
summer,False,partCloudy,28,61,28,1,0,cereal,61,work
summer,False,precipitation,25,37,20,1,0,vegetable,18,work
spring,False,sunny,11,48,62,0,0,fruit,94,work
spring,True,heavyCloudy,1,85,91,0,0,none,0,doNothing
autumn,False,partCloudy,21,13,92,1,0,vegetable,66,work
autumn,False,precipitation,2,25,95,0,0,cereal,18,doNothing
autumn,False,precipitation,0,50,32,0,1,vegetable,92,doNothing
winter,False,partCloudy,-18,27,2,0,1,none,0,doNothing
autumn,False,precipitation,7,49,6,0,0,fruit,92,doNothing
autumn,False,precipitation,19,21,48,1,0,cereal,93,work
autumn,False,precipitation,7,54,12,0,0,none,0,work
spring,False,sunny,1,25,30,1,0,fruit,20,work
autumn,False,partCloudy,9,80,44,0,0,vegetable,49,work
summer,False,heavyCloudy,20,95,36,0,1,fruit,11,work
winter,False,partCloudy,-17,3,9,1,1,vegetable,94,doNothing
winter,False,partCloudy,-15,62,35,0,1,fruit,51,doNothing
summer,False,sunny,35,6,24,0,0,cereal,94,work
summer,False,partCloudy,34,95,37,1,0,vegetable,86,work
summer,True,precipitation,36,25,83,1,0,fruit,87,work
spring,False,heavyCloudy,12,29,32,0,0,cereal,86,work
winter,False,sunny,-15,44,70,0,0,fruit,82,doNothing
winter,False,heavyCloudy,3,23,18,1,1,fruit,60,doNothing
summer,False,precipitation,20,71,73,1,0,cereal,3,work
winter,False,precipitation,-4,90,10,1,1,cereal,51,doNothing
autumn,False,sunny,4,70,73,1,1,cereal,15,work
winter,False,heavyCloudy,10,81,76,1,1,vegetable,80,doNothing
spring,False,partCloudy,2,2,22,1,1,vegetable,21,work
spring,False,precipitation,17,4,67,1,0,cereal,69,work
spring,False,heavyCloudy,10,48,55,0,1,cereal,100,work
autumn,False,precipitation,3,29,41,0,1,none,0,work
spring,False,precipitation,13,58,27,0,1,fruit,16,work
summer,False,partCloudy,28,85,14,0,1,none,0,work
summer,True,heavyCloudy,30,19,15,0,1,vegetable,49,doNothing
summer,True,heavyCloudy,30,74,21,1,0,cereal,16,doNothing
summer,False,heavyCloudy,33,38,35,0,0,vegetable,91,work
spring,False,partCloudy,1,68,59,1,1,vegetable,14,work
summer,False,precipitation,22,41,14,0,1,cereal,48,work
autumn,False,precipitation,8,66,44,0,0,cereal,65,doNothing
spring,False,sunny,7,35,72,1,0,fruit,92,work
summer,False,heavyCloudy,24,36,81,0,1,cereal,6,work
winter,False,heavyCloudy,-5,26,27,0,0,cereal,78,doNothing
summer,False,sunny,27,45,40,1,0,fruit,57,work
spring,False,precipitation,8,30,79,1,1,none,0,work
winter,False,sunny,7,76,71,0,1,fruit,75,doNothing
winter,False,precipitation,9,49,5,1,0,fruit,7,doNothing
1 season anomalies weather temp water nutri pests weeds type ripeness target_column
2 winter False precipitation 5 44 17 1 0 vegetable 76 doNothing
3 spring False heavyCloudy 12 22 83 0 0 cereal 83 work
4 summer False sunny 25 85 84 0 0 cereal 85 work
5 summer False precipitation 24 24 67 0 0 none 0 work
6 spring False sunny 4 44 35 1 0 vegetable 96 work
7 summer False partCloudy 33 78 54 0 1 cereal 89 work
8 winter False heavyCloudy -1 27 87 1 1 cereal 1 doNothing
9 autumn True sunny 15 45 99 1 1 cereal 49 doNothing
10 autumn False partCloudy 20 54 81 0 1 none 0 work
11 winter False heavyCloudy -5 50 49 0 1 fruit 42 doNothing
12 summer False heavyCloudy 35 95 31 1 1 none 0 work
13 summer False partCloudy 36 14 42 0 1 vegetable 96 work
14 summer False precipitation 31 62 45 1 0 vegetable 3 work
15 summer True precipitation 35 35 41 1 0 none 0 doNothing
16 summer True heavyCloudy 35 33 97 0 0 fruit 76 work
17 autumn False sunny 3 24 62 1 1 vegetable 21 work
18 winter False partCloudy -18 80 37 0 0 cereal 24 doNothing
19 spring True precipitation 21 15 58 1 0 fruit 49 doNothing
20 autumn False precipitation 16 62 75 1 0 fruit 69 work
21 winter False heavyCloudy -11 69 9 0 1 none 0 doNothing
22 autumn False sunny 21 6 24 0 0 vegetable 99 work
23 summer False heavyCloudy 23 1 33 0 0 none 0 work
24 autumn False sunny 18 80 42 0 0 vegetable 47 work
25 summer False partCloudy 35 69 38 1 0 vegetable 40 work
26 summer False heavyCloudy 27 98 34 0 1 vegetable 20 work
27 winter False heavyCloudy -3 9 3 0 1 none 0 doNothing
28 summer False heavyCloudy 26 79 28 1 0 fruit 20 work
29 spring False precipitation 3 9 53 0 1 vegetable 30 doNothing
30 autumn False sunny 6 31 1 1 0 fruit 31 work
31 autumn False sunny 8 2 70 1 0 vegetable 54 work
32 spring False precipitation 8 21 1 1 0 fruit 92 doNothing
33 autumn False heavyCloudy 11 4 32 1 1 fruit 63 work
34 winter True precipitation -10 57 67 1 1 cereal 43 doNothing
35 winter False precipitation -13 90 14 1 1 fruit 29 doNothing
36 autumn True precipitation 10 68 46 0 0 fruit 18 doNothing
37 spring False heavyCloudy 8 41 55 1 1 fruit 12 work
38 winter False heavyCloudy -10 24 25 0 0 vegetable 32 doNothing
39 spring False heavyCloudy 0 40 6 0 0 none 0 work
40 autumn False sunny 22 7 88 0 1 vegetable 71 work
41 spring True precipitation 0 56 21 0 0 cereal 46 doNothing
42 autumn False sunny 13 37 49 0 1 vegetable 94 work
43 summer False precipitation 20 14 39 0 0 cereal 97 work
44 autumn False heavyCloudy 18 74 38 1 0 vegetable 32 work
45 autumn False heavyCloudy 2 100 70 0 0 none 0 work
46 autumn False precipitation 19 30 16 0 1 cereal 17 work
47 summer False sunny 26 94 83 1 1 fruit 25 work
48 autumn False heavyCloudy 14 91 62 0 0 vegetable 25 work
49 autumn False partCloudy 12 34 98 0 0 none 0 work
50 spring True heavyCloudy 5 64 50 0 0 vegetable 31 doNothing
51 summer True heavyCloudy 30 60 55 0 0 none 0 doNothing
52 summer False sunny 22 35 2 0 1 vegetable 20 work
53 spring False sunny 21 87 22 0 1 cereal 45 work
54 winter False heavyCloudy -2 48 83 0 1 vegetable 3 doNothing
55 winter False heavyCloudy -15 55 6 0 1 none 0 doNothing
56 summer False heavyCloudy 35 5 68 1 0 vegetable 79 work
57 summer True heavyCloudy 35 99 35 1 0 fruit 79 doNothing
58 winter False sunny -1 35 57 1 0 vegetable 80 doNothing
59 summer True precipitation 31 55 73 0 1 vegetable 24 doNothing
60 autumn True precipitation 21 26 84 0 0 vegetable 49 doNothing
61 winter False precipitation -8 13 30 1 0 none 0 doNothing
62 autumn False heavyCloudy 20 58 15 1 0 cereal 56 work
63 spring False partCloudy 12 25 61 1 1 vegetable 11 work
64 winter False partCloudy -14 58 54 0 1 none 0 doNothing
65 autumn False sunny 6 4 96 1 0 cereal 42 work
66 summer False sunny 29 74 98 0 1 vegetable 22 work
67 summer False sunny 32 83 90 1 0 none 0 work
68 summer True sunny 33 11 11 0 1 fruit 45 work
69 spring False sunny 3 54 13 1 1 none 0 work
70 autumn False heavyCloudy 20 67 97 0 0 cereal 68 doNothing
71 spring False sunny 5 35 54 0 0 vegetable 37 work
72 summer False precipitation 31 44 68 1 0 vegetable 9 work
73 winter False heavyCloudy -11 59 18 1 1 cereal 11 doNothing
74 summer False precipitation 30 32 57 1 1 fruit 18 work
75 summer False sunny 27 31 54 0 1 vegetable 67 work
76 summer False precipitation 29 70 73 1 0 fruit 71 work
77 spring False sunny 18 67 22 1 0 fruit 64 work
78 spring False partCloudy 13 40 18 1 0 fruit 7 work
79 summer False precipitation 23 24 6 1 0 vegetable 90 work
80 autumn False heavyCloudy 1 59 84 0 0 none 0 work
81 spring False precipitation 2 47 99 0 0 vegetable 83 doNothing
82 summer False precipitation 32 9 94 1 0 cereal 18 work
83 winter False partCloudy -14 56 74 1 1 fruit 24 doNothing
84 winter False sunny -5 100 55 0 0 cereal 57 doNothing
85 summer False sunny 30 99 99 1 1 cereal 31 work
86 winter True precipitation -13 56 58 1 0 none 0 doNothing
87 spring False precipitation 1 24 21 1 1 none 0 work
88 spring False heavyCloudy 2 38 56 0 0 fruit 9 work
89 winter False partCloudy -7 60 71 0 0 cereal 70 doNothing
90 autumn False precipitation 2 71 2 0 1 cereal 26 doNothing
91 autumn False sunny 19 99 7 1 1 none 0 work
92 spring False sunny 8 41 35 0 1 vegetable 89 work
93 winter False sunny -14 58 94 0 1 vegetable 29 doNothing
94 summer True precipitation 30 3 58 1 0 none 0 doNothing
95 winter False precipitation 8 17 76 1 0 vegetable 47 doNothing
96 spring True precipitation 20 38 65 0 1 cereal 49 doNothing
97 winter False partCloudy -4 8 10 0 1 cereal 74 doNothing
98 autumn False sunny 2 100 7 1 1 none 0 work
99 autumn False partCloudy 17 88 89 0 1 vegetable 17 work
100 autumn False partCloudy 16 76 54 1 0 vegetable 98 work
101 spring False sunny 2 14 25 0 1 vegetable 8 work
102 spring False precipitation 5 34 1 1 0 none 0 work
103 autumn False heavyCloudy 9 20 28 0 0 cereal 88 work
104 autumn False heavyCloudy 20 17 84 0 0 cereal 15 work
105 winter False heavyCloudy -18 43 33 0 1 cereal 31 doNothing
106 autumn False partCloudy 2 1 3 1 1 cereal 86 work
107 summer False heavyCloudy 34 58 23 0 0 cereal 27 work
108 summer False precipitation 31 22 14 0 1 fruit 33 work
109 winter False sunny -5 98 51 1 0 none 0 doNothing
110 winter False precipitation -17 74 78 1 0 none 0 doNothing
111 summer False precipitation 29 3 54 0 0 none 0 work
112 autumn False precipitation 7 45 29 1 1 cereal 52 doNothing
113 spring False sunny 7 21 30 0 1 fruit 38 work
114 summer False heavyCloudy 28 73 75 1 1 none 0 work
115 summer False heavyCloudy 32 49 43 0 0 vegetable 74 work
116 autumn True precipitation 0 99 66 0 0 none 0 doNothing
117 summer True partCloudy 32 46 99 0 1 none 0 work
118 autumn False heavyCloudy 21 26 44 1 0 none 0 work
119 summer True precipitation 30 28 89 1 1 cereal 65 doNothing
120 autumn False heavyCloudy 20 100 46 1 0 fruit 25 work
121 winter False partCloudy -3 78 63 1 0 vegetable 18 doNothing
122 spring False partCloudy 22 8 86 1 1 none 0 work
123 winter False partCloudy 2 34 30 1 0 fruit 95 doNothing
124 summer True partCloudy 31 35 26 0 0 fruit 3 work
125 winter False partCloudy 9 80 24 1 1 vegetable 67 doNothing
126 winter False heavyCloudy -19 85 14 1 1 vegetable 33 doNothing
127 autumn False partCloudy 3 15 6 0 0 vegetable 11 work
128 winter False partCloudy 10 20 62 1 1 fruit 90 doNothing
129 autumn False precipitation 11 93 90 1 0 vegetable 87 work
130 summer False partCloudy 22 79 60 1 1 none 0 work
131 winter True precipitation -6 55 88 1 0 vegetable 64 doNothing
132 winter False precipitation -13 31 62 0 1 fruit 70 doNothing
133 autumn False precipitation 20 90 2 1 1 fruit 73 work
134 winter False heavyCloudy 9 100 76 1 1 cereal 41 doNothing
135 summer False partCloudy 30 8 90 1 1 cereal 15 work
136 winter False heavyCloudy 4 27 77 1 1 vegetable 99 doNothing
137 summer False partCloudy 33 67 34 0 0 cereal 44 work
138 summer True precipitation 34 28 100 1 0 vegetable 64 work
139 winter True precipitation -9 34 88 1 1 cereal 5 doNothing
140 spring False heavyCloudy 10 33 54 1 0 fruit 63 work
141 spring False precipitation 0 77 32 0 0 fruit 100 doNothing
142 autumn False sunny 3 7 59 1 0 cereal 62 work
143 winter False heavyCloudy -2 50 37 0 0 vegetable 51 doNothing
144 summer False partCloudy 33 74 88 1 1 fruit 49 work
145 spring False sunny 14 14 29 1 1 none 0 work
146 summer False heavyCloudy 24 98 18 1 0 vegetable 99 work
147 winter False heavyCloudy -15 52 38 0 1 vegetable 66 doNothing
148 spring True partCloudy 9 62 24 0 1 fruit 67 doNothing
149 spring False precipitation 2 87 100 1 0 vegetable 39 doNothing
150 spring False precipitation 16 94 45 0 0 vegetable 35 work
151 winter False precipitation 5 41 82 0 1 fruit 80 doNothing
152 spring False partCloudy 13 49 4 1 0 cereal 97 work
153 winter False partCloudy -17 24 42 1 1 fruit 71 doNothing
154 spring False heavyCloudy 20 45 71 1 1 vegetable 58 work
155 winter False precipitation -8 78 81 1 1 fruit 8 doNothing
156 spring False partCloudy 5 31 82 0 1 fruit 18 work
157 autumn False sunny 6 75 85 0 0 fruit 18 doNothing
158 spring False precipitation 14 9 1 1 0 none 0 work
159 winter False heavyCloudy 2 37 5 1 1 cereal 1 doNothing
160 summer False precipitation 20 44 28 1 1 none 0 work
161 winter False partCloudy -4 97 90 1 1 vegetable 94 doNothing
162 summer True precipitation 26 46 55 1 0 cereal 91 doNothing
163 spring False sunny 15 97 67 1 1 none 0 work
164 summer False partCloudy 33 40 14 1 0 none 0 work
165 spring False partCloudy 4 23 51 0 0 vegetable 8 work
166 summer False sunny 20 66 76 1 1 vegetable 71 work
167 winter False sunny -11 2 98 0 1 vegetable 29 doNothing
168 spring False sunny 9 67 74 0 0 none 0 work
169 autumn False precipitation 17 23 94 1 1 none 0 work
170 autumn False heavyCloudy 22 65 69 0 1 fruit 79 work
171 winter False heavyCloudy -2 35 82 1 1 cereal 20 doNothing
172 winter True heavyCloudy -10 1 73 1 0 fruit 77 doNothing
173 autumn False sunny 4 58 71 1 1 fruit 94 work
174 summer False sunny 32 44 20 1 1 vegetable 48 work
175 summer False heavyCloudy 31 68 37 1 0 cereal 42 work
176 winter False heavyCloudy -1 69 34 0 0 none 0 doNothing
177 spring False heavyCloudy 10 27 43 1 1 vegetable 49 work
178 summer False partCloudy 26 86 12 0 1 none 0 work
179 winter True precipitation 5 62 62 1 1 cereal 85 doNothing
180 winter False partCloudy 9 29 83 1 0 vegetable 14 doNothing
181 spring False sunny 8 22 33 0 1 cereal 23 work
182 summer False partCloudy 34 38 2 1 1 fruit 29 work
183 autumn False heavyCloudy 2 65 91 1 1 vegetable 49 work
184 spring False sunny 3 73 32 0 0 fruit 61 work
185 spring False precipitation 7 68 70 0 0 none 0 work
186 winter False partCloudy 10 68 2 0 0 cereal 80 doNothing
187 winter False precipitation -16 89 7 0 0 fruit 92 doNothing
188 winter False precipitation 0 31 49 0 1 cereal 18 doNothing
189 spring False heavyCloudy 7 44 86 1 1 none 0 work
190 summer False sunny 24 1 75 0 1 none 0 work
191 summer True heavyCloudy 39 3 100 1 0 cereal 30 work
192 winter False heavyCloudy 2 88 69 1 1 cereal 79 doNothing
193 spring False heavyCloudy 16 100 21 0 1 cereal 57 work
194 autumn True heavyCloudy 1 17 62 0 1 cereal 92 doNothing
195 autumn False sunny 1 69 54 0 0 cereal 62 work
196 autumn False sunny 17 62 84 0 1 vegetable 18 work
197 summer False heavyCloudy 24 57 84 0 1 vegetable 1 work
198 spring False partCloudy 8 80 61 0 0 none 0 work
199 autumn False heavyCloudy 1 93 79 0 0 fruit 62 work
200 winter False sunny -4 51 33 1 0 none 0 doNothing
201 autumn False precipitation 4 51 73 1 1 fruit 57 doNothing
202 autumn True heavyCloudy 5 88 81 0 1 fruit 25 doNothing
203 summer False precipitation 30 26 45 0 0 none 0 work
204 winter False partCloudy 3 88 46 1 0 none 0 doNothing
205 autumn False heavyCloudy 8 20 34 0 1 fruit 62 work
206 spring False partCloudy 15 34 33 0 0 vegetable 16 work
207 winter False heavyCloudy -20 80 25 1 0 vegetable 45 doNothing
208 spring False precipitation 6 34 78 1 0 cereal 6 doNothing
209 spring True heavyCloudy 3 97 65 1 0 fruit 21 doNothing
210 summer False precipitation 34 49 65 1 0 vegetable 10 work
211 summer True precipitation 26 29 2 0 0 cereal 56 doNothing
212 autumn False partCloudy 10 3 19 0 0 vegetable 67 work
213 spring False sunny 19 60 71 0 1 cereal 5 work
214 winter False partCloudy 5 11 66 0 0 none 0 doNothing
215 winter False heavyCloudy -13 86 29 1 1 cereal 98 doNothing
216 summer False precipitation 33 19 2 1 1 cereal 78 work
217 spring False precipitation 13 6 40 0 0 cereal 49 work
218 summer False partCloudy 31 15 70 1 0 cereal 100 work
219 spring False heavyCloudy 8 40 1 0 0 cereal 83 work
220 spring False partCloudy 10 77 95 1 1 fruit 85 work
221 spring False partCloudy 3 96 32 1 1 fruit 16 work
222 winter False sunny -11 24 5 1 0 none 0 doNothing
223 summer True heavyCloudy 34 14 11 0 0 vegetable 36 doNothing
224 summer True precipitation 34 69 54 1 0 none 0 doNothing
225 spring True precipitation 21 92 44 0 0 fruit 34 doNothing
226 spring False sunny 10 58 14 1 1 none 0 work
227 spring False partCloudy 9 22 68 0 0 vegetable 85 work
228 winter False precipitation -20 62 18 0 1 vegetable 78 doNothing
229 spring False sunny 10 51 7 1 1 none 0 work
230 autumn True heavyCloudy 19 89 2 1 0 cereal 6 doNothing
231 winter False heavyCloudy -6 99 10 0 1 fruit 70 doNothing
232 spring False sunny 2 84 49 1 0 none 0 work
233 summer False heavyCloudy 27 11 32 0 1 cereal 22 work
234 summer False partCloudy 27 55 39 1 1 none 0 work
235 winter False heavyCloudy -13 53 1 1 1 none 0 doNothing
236 summer False partCloudy 27 15 78 1 1 cereal 43 work
237 winter False partCloudy -4 79 5 0 0 vegetable 1 doNothing
238 winter False sunny -1 6 31 0 0 fruit 13 doNothing
239 summer True precipitation 31 86 32 0 1 fruit 98 doNothing
240 winter False precipitation -2 96 89 1 1 cereal 57 doNothing
241 spring False sunny 18 28 92 1 0 fruit 20 work
242 summer False precipitation 27 90 37 1 0 cereal 55 work
243 summer False heavyCloudy 32 41 3 0 0 cereal 35 work
244 autumn False precipitation 2 31 90 1 0 cereal 7 doNothing
245 winter False partCloudy -9 74 28 1 1 fruit 72 doNothing
246 summer False partCloudy 23 8 99 0 1 none 0 work
247 spring False heavyCloudy 8 85 29 0 0 none 0 work
248 winter False sunny -6 67 100 1 1 fruit 25 doNothing
249 winter False partCloudy 10 88 85 1 1 cereal 68 doNothing
250 spring False sunny 20 99 73 0 0 vegetable 18 work
251 spring False sunny 12 52 22 0 0 none 0 work
252 winter False sunny -18 16 57 0 0 vegetable 69 doNothing
253 winter False partCloudy -13 17 10 0 0 vegetable 93 doNothing
254 summer False partCloudy 23 18 24 0 1 fruit 7 work
255 spring False partCloudy 2 50 95 1 1 vegetable 49 work
256 summer False partCloudy 23 51 40 1 0 none 0 work
257 summer False partCloudy 28 61 28 1 0 cereal 61 work
258 summer False precipitation 25 37 20 1 0 vegetable 18 work
259 spring False sunny 11 48 62 0 0 fruit 94 work
260 spring True heavyCloudy 1 85 91 0 0 none 0 doNothing
261 autumn False partCloudy 21 13 92 1 0 vegetable 66 work
262 autumn False precipitation 2 25 95 0 0 cereal 18 doNothing
263 autumn False precipitation 0 50 32 0 1 vegetable 92 doNothing
264 winter False partCloudy -18 27 2 0 1 none 0 doNothing
265 autumn False precipitation 7 49 6 0 0 fruit 92 doNothing
266 autumn False precipitation 19 21 48 1 0 cereal 93 work
267 autumn False precipitation 7 54 12 0 0 none 0 work
268 spring False sunny 1 25 30 1 0 fruit 20 work
269 autumn False partCloudy 9 80 44 0 0 vegetable 49 work
270 summer False heavyCloudy 20 95 36 0 1 fruit 11 work
271 winter False partCloudy -17 3 9 1 1 vegetable 94 doNothing
272 winter False partCloudy -15 62 35 0 1 fruit 51 doNothing
273 summer False sunny 35 6 24 0 0 cereal 94 work
274 summer False partCloudy 34 95 37 1 0 vegetable 86 work
275 summer True precipitation 36 25 83 1 0 fruit 87 work
276 spring False heavyCloudy 12 29 32 0 0 cereal 86 work
277 winter False sunny -15 44 70 0 0 fruit 82 doNothing
278 winter False heavyCloudy 3 23 18 1 1 fruit 60 doNothing
279 summer False precipitation 20 71 73 1 0 cereal 3 work
280 winter False precipitation -4 90 10 1 1 cereal 51 doNothing
281 autumn False sunny 4 70 73 1 1 cereal 15 work
282 winter False heavyCloudy 10 81 76 1 1 vegetable 80 doNothing
283 spring False partCloudy 2 2 22 1 1 vegetable 21 work
284 spring False precipitation 17 4 67 1 0 cereal 69 work
285 spring False heavyCloudy 10 48 55 0 1 cereal 100 work
286 autumn False precipitation 3 29 41 0 1 none 0 work
287 spring False precipitation 13 58 27 0 1 fruit 16 work
288 summer False partCloudy 28 85 14 0 1 none 0 work
289 summer True heavyCloudy 30 19 15 0 1 vegetable 49 doNothing
290 summer True heavyCloudy 30 74 21 1 0 cereal 16 doNothing
291 summer False heavyCloudy 33 38 35 0 0 vegetable 91 work
292 spring False partCloudy 1 68 59 1 1 vegetable 14 work
293 summer False precipitation 22 41 14 0 1 cereal 48 work
294 autumn False precipitation 8 66 44 0 0 cereal 65 doNothing
295 spring False sunny 7 35 72 1 0 fruit 92 work
296 summer False heavyCloudy 24 36 81 0 1 cereal 6 work
297 winter False heavyCloudy -5 26 27 0 0 cereal 78 doNothing
298 summer False sunny 27 45 40 1 0 fruit 57 work
299 spring False precipitation 8 30 79 1 1 none 0 work
300 winter False sunny 7 76 71 0 1 fruit 75 doNothing
301 winter False precipitation 9 49 5 1 0 fruit 7 doNothing