Skip to content

Commit cfa2c15

Browse files
author
Hamid Gasmi
committed
#184 is started
1 parent 8b5fa2d commit cfa2c15

File tree

11 files changed

+100
-0
lines changed

11 files changed

+100
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import sys
2+
3+
def outcome_likelihood(x,sigma,states,transition,emission):
4+
5+
return 0
6+
7+
if __name__ == "__main__":
8+
x = sys.stdin.readline().strip()
9+
sys.stdin.readline() # delimiter
10+
11+
sigma = sys.stdin.readline().strip().split()
12+
sys.stdin.readline() # delimiter
13+
14+
states = sys.stdin.readline().strip().split()
15+
sys.stdin.readline() # delimiter
16+
17+
chars = sys.stdin.readline().strip().split()
18+
transition = [sys.stdin.readline().strip().split() for _ in range(len(states))]
19+
transition = {line[0]:dict(zip(chars, map(float,line[1:]))) for line in transition}
20+
sys.stdin.readline() # delimiter
21+
22+
chars = sys.stdin.readline().strip().split()
23+
emission = [sys.stdin.readline().strip().split() for _ in range(len(states))]
24+
emission = {line[0]:dict(zip(chars, map(float,line[1:]))) for line in emission}
25+
26+
print(outcome_likelihood(x,sigma,states,transition,emission))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.001544
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
xzyyz
2+
--------
3+
x y z
4+
--------
5+
A B
6+
--------
7+
A B
8+
A 0.303 0.697
9+
B 0.831 0.169
10+
--------
11+
x y z
12+
A 0.533 0.065 0.402
13+
B 0.342 0.334 0.324
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
x
2+
--------
3+
x
4+
--------
5+
A B
6+
--------
7+
A B
8+
A 0.5 0.5
9+
B 0.5 0.5
10+
--------
11+
x
12+
A 0.5
13+
B 0.5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.252
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
xy
2+
--------
3+
x y
4+
--------
5+
A B
6+
--------
7+
A B
8+
A 0.4 0.6
9+
B 0.6 0.4
10+
--------
11+
x y
12+
A 0.7 0.3
13+
B 0.4 0.6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
xzywyxw
2+
--------
3+
w x y z
4+
--------
5+
A B C
6+
--------
7+
A B C
8+
A 0.7 0.1 0.2
9+
B 0.5 0.3 0.2
10+
C 0.1 0.4 0.5
11+
--------
12+
w x y z
13+
A 0.34 0.24 0.42 0
14+
B 0.17 0.49 0.34 0
15+
C 0.22 0.22 0.56 0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9.17e-09
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
xxxxyxxxzz
2+
--------
3+
x y z
4+
--------
5+
A B C
6+
--------
7+
A B C
8+
A 0.7 0.1 0.2
9+
B 0.5 0.3 0.2
10+
C 0.1 0.4 0.5
11+
--------
12+
x y z
13+
A 0.24 0.41 0.01
14+
B 0.49 0.33 0.01
15+
C 0.22 0.55 0.01

0 commit comments

Comments
 (0)