forked from s444426/AIProjekt
114 lines
4.1 KiB
Python
114 lines
4.1 KiB
Python
from soil_upgrade import Soil
|
|
from carrot_upgrade import Carrot
|
|
from beetroot_upgrade import Beetroot
|
|
from cabbage_upgrade import Cabbage
|
|
|
|
header = ['previous', 'soil pH', 'dry level', 'label']
|
|
|
|
training_data = [
|
|
['carrot', 'alkaline', 'dry', 'beetroot'],
|
|
['carrot', 'slightly acidic', 'dry', 'beetroot'],
|
|
['cabbage', 'alkaline', 'dry', 'beetroot'],
|
|
['none', 'alkaline', 'dry', 'beetroot'],
|
|
['carrot', 'slightly acidic', 'medium wet', 'beetroot'],
|
|
['none', 'slightly acidic', 'dry', 'beetroot'],
|
|
['pumpkin', 'neutral', 'dry', 'beetroot'],
|
|
['beetroot', 'neutral', 'dry', 'beetroot'],
|
|
['cabbage', 'alkaline', 'medium wet', 'beetroot'],
|
|
['none', 'slightly acidic', 'medium wet', 'beetroot'],
|
|
['cabbage', 'acidic', 'dry', 'carrot'],
|
|
['none', 'acidic', 'medium wet', 'carrot'],
|
|
['carrot', 'neutral', 'dry', 'carrot'],
|
|
['beetroot', 'slightly acidic', 'dry', 'carrot'],
|
|
['pumpkin', 'acidic', 'medium wet', 'carrot'],
|
|
['beetroot', 'acidic', 'medium wet', 'carrot'],
|
|
['carrot', 'neutral', 'dry', 'carrot'],
|
|
['pumpkin', 'slightly acidic', 'medium wet', 'carrot'],
|
|
['beetroot', 'neutral', 'wet', 'pumpkin'],
|
|
['none', 'neutral', 'wet', 'pumpkin'],
|
|
['carrot', 'slightly acidic', 'wet', 'pumpkin'],
|
|
['pumpkin', 'neutral', 'wet', 'pumpkin'],
|
|
['cabbage', 'slightly acidic', 'medium wet', 'pumpkin'],
|
|
['carrot', 'neutral', 'wet', 'pumpkin'],
|
|
['cabbage', 'neutral', 'wet', 'pumpkin'],
|
|
['none', 'slightly acidic', 'wet', 'pumpkin'],
|
|
['beetroot', 'slightly acidic', 'medium wet', 'pumpkin'],
|
|
['carrot', 'neutral', 'medium wet', 'cabbage'],
|
|
['pumpkin', 'alkaline', 'wet', 'cabbage'],
|
|
['none', 'alkaline', 'medium wet', 'cabbage'],
|
|
['beetroot', 'neutral', 'medium wet', 'cabbage'],
|
|
['cabbage', 'slightly acidic', 'wet', 'cabbage'],
|
|
['none', 'neutral', 'medium wet', 'cabbage'],
|
|
['cabbage', 'neutral', 'medium wet', 'cabbage'],
|
|
['carrot', 'alkaline', 'wet', 'cabbage'],
|
|
['none', 'alkaline', 'wet', 'cabbage'],
|
|
['pumpkin', 'neutral', 'medium wet', 'cabbage'],
|
|
['carrot', 'neutral', 'soaking wet', 'none'],
|
|
['beetroot', 'alkaline', 'very dry', 'none'],
|
|
['none', 'alkaline', 'soaking wet', 'none'],
|
|
['cabbage', 'acidic', 'medium wet', 'none'],
|
|
['pumpkin', 'acidic', 'soaking wet', 'none'],
|
|
['cabbage', 'slightly acidic', 'soaking wet', 'none'],
|
|
['none', 'slightly acidic', 'soaking wet', 'none'],
|
|
['carrot', 'neutral', 'very dry', 'none'],
|
|
['carrot', 'acidic', 'medium wet', 'none'],
|
|
['pumpkin', 'neutral', 'soaking wet', 'none']
|
|
]
|
|
|
|
testing_data = [
|
|
|
|
['beetroot', 'neutral', 'dry', 'beetroot'],
|
|
['cabbage', 'alkaline', 'medium wet', 'beetroot'],
|
|
['none', 'slightly acidic', 'medium wet', 'beetroot'],
|
|
['cabbage', 'acidic', 'dry', 'carrot'],
|
|
['none', 'acidic', 'medium wet', 'carrot'],
|
|
['carrot', 'neutral', 'dry', 'carrot'],
|
|
['beetroot', 'neutral', 'wet', 'pumpkin'],
|
|
['none', 'neutral', 'wet', 'pumpkin'],
|
|
['carrot', 'slightly acidic', 'wet', 'pumpkin'],
|
|
['carrot', 'neutral', 'medium wet', 'cabbage'],
|
|
['pumpkin', 'alkaline', 'wet', 'cabbage'],
|
|
['none', 'alkaline', 'medium wet', 'cabbage'],
|
|
['carrot', 'neutral', 'soaking wet', 'none'],
|
|
['beetroot', 'alkaline', 'very dry', 'none'],
|
|
['none', 'alkaline', 'soaking wet', 'none'],
|
|
|
|
]
|
|
|
|
|
|
def create_data_soil():
|
|
all_soil = []
|
|
|
|
soil = Soil(6.5, 0.5)
|
|
plant = Cabbage(100)
|
|
soil.add_plant(plant)
|
|
all_soil.append(soil)
|
|
|
|
soil = Soil(4.6, 0.7)
|
|
plant = Carrot(100)
|
|
soil.add_plant(plant)
|
|
all_soil.append(soil)
|
|
|
|
soil = Soil(5.6, 0.6)
|
|
all_soil.append(soil)
|
|
|
|
soil = Soil(6.1, 0.5)
|
|
plant = Beetroot(95)
|
|
soil.add_plant(plant)
|
|
all_soil.append(soil)
|
|
|
|
soil = Soil(6.5, 0.4)
|
|
plant = Cabbage(90)
|
|
soil.add_plant(plant)
|
|
all_soil.append(soil)
|
|
|
|
soil = Soil(6.0, 0.5)
|
|
all_soil.append(soil)
|
|
|
|
soil = Soil(7.1, 0.5)
|
|
plant = Cabbage(80)
|
|
soil.add_plant(plant)
|
|
all_soil.append(soil)
|
|
|
|
return all_soil
|