alt_dataset #1

Closed
s474137 wants to merge 7 commits from alt_dataset into tree_increase
Showing only changes of commit 255e45fd93 - Show all commits

View File

@ -0,0 +1,33 @@
import csv
import random
battery_values = ['high', 'medium', 'low']
distance_values = ['far', 'medium', 'close']
mood_values = ['good', 'medium', 'bad']
other = ['yes', 'no']
training_data = []
for _ in range(200):
battery = random.choice(battery_values)
distance = random.choice(distance_values)
mood = random.choice(mood_values)
memory = random.randint(0,4)
dishes_held = random.randint(0,4)
"""empty_basket = random.choice(other)
if empty_basket == 'yes':
dish_in_basket = 'no'
else:
dish_in_basket = random.choice(other)
dish_in_basket = random.choice(other)"""
waiting_for_order = random.choice(other)
waiting_for_dish = random.choice(other)
example = [battery, distance, mood, memory, dishes_held, waiting_for_order, waiting_for_dish]
training_data.append(example)
with open('data.csv', 'w', newline='') as file:
writer = csv.writer(file)
writer.writerows(training_data)