forked from collaborative-robotics/ABT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask04.py
47 lines (31 loc) · 772 Bytes
/
task04.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/python
#
# "global" constants needed by all
#
# Task01 SMALL BaumWelch
# Task02 SMALL Viterbi
# Task03 BIG BaumWelch
# Task04 BIG Viterbi
NSYMBOLS = 250
FIRSTSYMBOL = 25
SMALL = 1 # flags to switch models
BIG = 2
LARGE = BIG
MODEL = BIG # may need to clear this for test_xxx.py
random_flag = 0.500 # if a 'perturbation' is > this, it means totally random
# state transition matrix with no zero elements
RatioList = [5.0, 0.0, 0.25, 1.0, 2.5] # output spacing ratios (di/sigma)
T = True
F = False
Forward = 0
Viterbi = 1
BaumWelch = 2
BWTest = 3
######################
sig = 2.0
K = 1000
M = 1000*1000
NEpochs = 20*K
#### How many analysis runs to do
Nruns = 15
task = Viterbi