Оновити 'raport.md'

This commit is contained in:
Serhii Hromov 2020-05-25 14:11:16 +00:00
parent 1055515c1d
commit bffbcbe2fc

View File

@ -9,32 +9,15 @@ Użyłem drzew decyzyjnych.
Potrawy, ich nazwa, rodzaj oraz charakterystyka. Potrawy, ich nazwa, rodzaj oraz charakterystyka.
tree_format = ["dish", "served", "price", "origin", "cooked", "ingredients", "name"]
menu = Context.fromstring(''' |meat|salad|meal|drink|cold|hot |
Pork | X | | | | | X |
Espresso | | | | X | | X |
Latte | | | | X | | X |
Green Tea | | | | X | X | |
Greek Salad| | X | | | X | |
Pizza | | | X | | | X |''')
Dane uczące: Dane uczące:
training_data = [ dish - (salad/soup/meal/coffee/tea/non-alcho drink)
['meat','hot','Pork'], served - (cold/hot/warm)
['salad','cold','Greek Salad'], origin - (Worldwide/America/Europe/Asia)
['drink','hot','Espresso'], cooked - (baked/boiled/mixed)
['drink','hot','Latte'], ingridients - (2/4)
['drink','cold','Green Tea'],
['meal','hot','Pizza'],
['meal','cold','Wheat Pita'],
]
Dane testowe jest tworzone losowo w funkcji: Dane testowe jest tworzone losowo w funkcji:
@ -53,15 +36,12 @@ Dane testowe jest tworzone losowo w funkcji:
return order return order
### Implementacja ### Implementacja
####Drzewo: ####Drzewo:
Klasy: Klasy:
Klasa Question
#####Question #####Question
class Queestion: class Queestion:
def __init__(self, col, value): def __init__(self, col, value):
@ -73,7 +53,7 @@ Klasy:
def __repr__(self): def __repr__(self):
#just to print #just to print
Klasa Node
#####Node #####Node
class Decision_Node(): class Decision_Node():
#contain the question and child nodes #contain the question and child nodes
@ -91,7 +71,6 @@ Klasy:
### Biblioteki ### Biblioteki
* concepts
* random * random
* numpy * numpy