Оновити 'raport.md'
This commit is contained in:
parent
26a2824818
commit
9455e783a4
74
raport.md
74
raport.md
@ -2,79 +2,56 @@
|
|||||||
|
|
||||||
### Opis
|
### Opis
|
||||||
|
|
||||||
Tematem podprojektu jest rozpoznawanie posiłków.
|
Tematem podprojektu jest rozpoznawanie zamówień na podstawie historii zamówień.
|
||||||
Użyty jest algorytm genetyczny.
|
Użyłem drzew decyzyjnych.
|
||||||
|
|
||||||
### Dane
|
### Dane
|
||||||
|
|
||||||
Posiłki, ich nazwa oraz rodzaj.
|
Potrawy, ich nazwa, rodzaj oraz charakterystyka.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
menu = Context.fromstring(''' |meat|salad|meal|drink|cold|hot |
|
menu = Context.fromstring(''' |meat|salad|meal|drink|cold|hot |
|
||||||
Pork | X | | X | | | X |
|
Pork | X | | | | | X |
|
||||||
Espresso | | | | X | | X |
|
Espresso | | | | X | | X |
|
||||||
|
Latte | | | | X | | X |
|
||||||
Green Tea | | | | X | X | |
|
Green Tea | | | | X | X | |
|
||||||
Greek Salad| | X | X | | X | |
|
Greek Salad| | X | | | X | |
|
||||||
Pizza | | | X | | | X |''')
|
Pizza | | | X | | | X |''')
|
||||||
|
|
||||||
|
|
||||||
Za pomocy graphviz możemy narysować grafy z poniższego kodu:
|
|
||||||
|
|
||||||
|
|
||||||
digraph Lattice {
|
Dane uczące:
|
||||||
node [label="" shape=circle style=filled width=.25]
|
training_data = [
|
||||||
edge [dir=none labeldistance=1.5 minlen=2]
|
['meat','hot','Pork'],
|
||||||
c0
|
['salad','cold','Greek Salad'],
|
||||||
c1
|
['drink','hot','Espresso'],
|
||||||
c1 -> c1 [color=transparent headlabel=Pork labelangle=270]
|
['drink','hot','Latte'],
|
||||||
c1 -> c1 [color=transparent labelangle=90 taillabel=meat]
|
['drink','cold','Green Tea'],
|
||||||
c1 -> c0
|
['meal','hot','Pizza'],
|
||||||
c2
|
]
|
||||||
c2 -> c2 [color=transparent headlabel="Green Tea" labelangle=270]
|
|
||||||
c2 -> c2 [color=transparent labelangle=90 taillabel=cold]
|
|
||||||
c2 -> c0
|
|
||||||
c3
|
|
||||||
c3 -> c3 [color=transparent headlabel="Greek Salad" labelangle=270]
|
|
||||||
c3 -> c3 [color=transparent labelangle=90 taillabel=salad]
|
|
||||||
c3 -> c0
|
|
||||||
c4
|
|
||||||
c4 -> c4 [color=transparent headlabel=Espresso labelangle=270]
|
|
||||||
c4 -> c4 [color=transparent labelangle=90 taillabel=drink]
|
|
||||||
c4 -> c2
|
|
||||||
c5
|
|
||||||
c5 -> c1
|
|
||||||
c5 -> c3
|
|
||||||
c5 -> c4
|
|
||||||
}
|
|
||||||
|
|
||||||
Dane testowe:
|
Dane testowe:
|
||||||
func_input = ['meal']
|
test_data = [
|
||||||
|
['meat','hot','Latte'],
|
||||||
|
['salad','hot','Greek Salad'],
|
||||||
|
['drink','hot','Pork'],
|
||||||
|
['drink','cold','Green Tea'],
|
||||||
|
['drink','hot','Greek Salad'],
|
||||||
|
]
|
||||||
|
|
||||||
Dane wyjściowe:
|
|
||||||
|
|
||||||
['Pork', 'Greek Salad', 'Pizza']
|
|
||||||
|
|
||||||
|
|
||||||
### Implementacja
|
### Implementacja
|
||||||
|
|
||||||
Główna część:
|
Główna część:
|
||||||
|
|
||||||
|
In process
|
||||||
|
|
||||||
gen_num = 20 #generations
|
|
||||||
gen_sol = 6 #solutions
|
|
||||||
gen_par_mating = 2 #how many solutions we select
|
|
||||||
|
|
||||||
mut_per_gen = 10
|
|
||||||
mut_num_gen = None
|
|
||||||
|
|
||||||
par_selc_type = "tournament"
|
|
||||||
crossover = "two_points"
|
|
||||||
muta_type = "scramble"
|
|
||||||
par_keep = 1 #keep only one parent
|
|
||||||
|
|
||||||
init_range_l = -2 #low
|
|
||||||
init_range_h = -5 #high
|
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
@ -82,7 +59,6 @@ Główna część:
|
|||||||
### Biblioteki
|
### Biblioteki
|
||||||
|
|
||||||
* concepts
|
* concepts
|
||||||
* pygad (algorytm genetyczny)
|
|
||||||
* random
|
* random
|
||||||
* numpy
|
* numpy
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user