Projekt 3 - final info

This commit is contained in:
Serhii Hromov 2020-06-29 07:29:45 +00:00
parent fc71c86879
commit f0cfdb88f8

View File

@ -36,14 +36,31 @@ Wywołanie podprojektu jest po wciśnięciu '2':
#Execute project #Execute project
if event.key == pygame.K_2: if event.key == pygame.K_2:
temp_order = client_ordering() if not actTake:
print("Passed: %s. Prediction: %s" % (temp_order, print_leaf(classify(temp_order, tree)))) actTake = True
else:
actTake = False
Wtedy w terminalu jest wypisany wynik działania: Wtedy kiedy kelner stoi przy stoliku, to przyjmuje zamówienie:
if actTake:
temp_order.append(client_ordering())
Kiedy stoi na kuchnie - decyduje:
if actTake:
if temp_order:
for each in temp_order:
print("Passed: %s. Prediction: %s" % (each, print_leaf(classify(each, tree))))
temp_order.clear()
Przykładowy wynik działania:
#Example #Example
Passed: ['salad', 'hot', 'Europe', 'baked', 2, 'order']. Prediction: {'Shrimp and Escarole Salad': '100%'} Passed: ['salad', 'hot', 'Europe', 'baked', 2, 'order']. Prediction: {'Shrimp and Escarole Salad': '100%'}
Wyniki wypisywane są do konsoli.
##### Serhii Hromov s442778 ##### Serhii Hromov s442778
### Projekt 4 ### Projekt 4