Thanks for your coding. I have some difficulties in understanding the following code.
Q1.
What is the purpose of the following code?
for j, el in enumerate(parents_value):
exp = len(parents_value) - j - 1
acc = el * (2**exp)
Q2,
And, for probA_W, I have the difficulty in understanding the meaning of row index
True False
0 0.3 0.7
1 0.1 0.9
For row index 0, is it W = True
For row index 1, is it W = False
Am I right?
Q3
Probability table Traffic Jam, I have the difficulty in understanding the meaning of row index
True False
0 0.10 0.90
1 0.60 0.40
2 0.30 0.70
3 0.50 0.50
4 0.95 0.05
5 0.95 0.05
6 0.95 0.05
7 0.95 0.05
For row index 0, is it H = True, W = True, A = True
For row index 1, is it H = True, W = True, A = False
For row index 2, is it H = True, W = False, A = True
For row index 3, is it H = True, W = False, A = False
For row index 4, is it H = False, W = True, A = True
For row index 5, is it H = False, W = True, A = False
For row index 6, is it H = False, W = False, A = True
For row index 7, is it H = False, W = False, A = False
Am I right?
Again, thanks for your sharing