$ python3 12_occassionally_unfair_casino.py coin --samples 5000 Converged after 335 steps Transition probabilities for fixed coin: [0.81646384 0.18353616] Transition probabilities for fair coin: [0.23310806 0.76689194] Emission probabilities for fixed coin: [0.11844357 0.88155643] Emission probabilities for fair coin: [0.51529647 0.48470353] Log-Likelihood P(O): -2986.7627 Total Expected Time in Fair State (1): 2201.78 / 5000 steps Total Expected Time in Fixed State (0): 2798.22 / 5000 steps State prediction accuracy 0.7338
$ python3 12_occassionally_unfair_casino.py die --samples 5000 Converged after 151 steps Transition probabilities for fixed die: [0.95515831 0.04484169] Transition probabilities for fair die: [0.04374899 0.95625101] Emission probabilities for fixed die: [0.07943047 0.09693867 0.10160139 0.11055038 0.10491876 0.50656034] Emission probabilities for fair die: [0.16891674 0.15031408 0.17497145 0.16981986 0.16977329 0.16620459] Log-Likelihood P(O): -8427.0733 Total Expected Time in Fair State (1): 2535.00 / 5000 steps Total Expected Time in Fixed State (0): 2465.00 / 5000 steps State prediction accuracy 0.8456
$ python3 12_occassionally_unfair_casino.py coin --samples 1000 Converged after 100 steps Transition probabilities for fixed coin: [0.98195615 0.01804385] Transition probabilities for fair coin: [0.00635834 0.99364166] Emission probabilities for fixed coin: [0.05223814 0.94776186] Emission probabilities for fair coin: [0.48337039 0.51662961] Log-Likelihood P(O): -614.0970 Total Expected Time in Fair State (1): 778.79 / 1000 steps Total Expected Time in Fixed State (0): 221.21 / 1000 steps State prediction accuracy 0.98
A=bbm1m2m3i1i2i3i4d1d2d3ee(0.0.70.0.0.20.0.0.0.10.0.0.0.0.0.70.0.0.20.0.0.0.10.0.0.0.0.0.70.0.0.20.0.0.0.10.0.0.0.0.0.0.0.0.30.0.0.0.70.0.750.0.0.20.0.0.0.050.0.0.0.0.0.750.0.0.20.0.0.0.050.0.0.0.0.0.750.0.0.20.0.0.0.050.0.0.0.0.0.0.0.0.20.0.0.0.80.0.0.80.0.0.050.0.0.0.150.0.0.0.0.0.80.0.0.050.0.0.0.150.0.0.0.0.0.0.0.0.050.0.0.0.950.0.0.0.0.0.0.0.0.0.0.1.) A= \begin{matrix} bb \\ m_1 \\ m_2 \\ m_3 \\ i_1 \\ i_2 \\ i_3 \\ i_4 \\ d_1 \\ d_2 \\ d_3 \\ ee \quad \end{matrix} \begin{pmatrix} 0. & 0.7 & 0. & 0. & 0.2 & 0. & 0. & 0. & 0.1 & 0. & 0. & 0. \\ 0. & 0. & 0.7 & 0. & 0. & 0.2 & 0. & 0. & 0. & 0.1 & 0. & 0. \\ 0. & 0. & 0. & 0.7 & 0. & 0. & 0.2 & 0. & 0. & 0. & 0.1 & 0. \\ 0. & 0. & 0. & 0. & 0. & 0. & 0. & 0.3 & 0. & 0. & 0. & 0.7 \\ 0. & 0.75 & 0. & 0. & 0.2 & 0. & 0. & 0. & 0.05 & 0. & 0. & 0. \\ 0. & 0. & 0.75 & 0. & 0. & 0.2 & 0. & 0. & 0. & 0.05 & 0. & 0. \\ 0. & 0. & 0. & 0.75 & 0. & 0. & 0.2 & 0. & 0. & 0. & 0.05 & 0. \\ 0. & 0. & 0. & 0. & 0. & 0. & 0. & 0.2 & 0. & 0. & 0. & 0.8 \\ 0. & 0. & 0.8 & 0. & 0. & 0.05 & 0. & 0. & 0. & 0.15 & 0. & 0. \\ 0. & 0. & 0. & 0.8 & 0. & 0. & 0.05 & 0. & 0. & 0. & 0.15 & 0. \\ 0. & 0. & 0. & 0. & 0. & 0. & 0. & 0.05 & 0. & 0. & 0. & 0.95 \\ 0. & 0. & 0. & 0. & 0. & 0. & 0. & 0. & 0. & 0. & 0. & 1. \end{pmatrix}
Match found in: |/IAGRA- cla Probabilities: [ -inf -inf -inf -inf -inf -inf -inf -5.7587489 -5.48896803 -5.44217472 -5.43293618 -5.43107642 -5.43084088]
Match found in: V ia gr a Probabilities: [ -inf -inf -inf -inf -inf -inf -10.29903327 -8.25430923 -6.47155141 -5.81507491]