第520行: |
第520行: |
| | | |
| ==最简马尔科夫链下的解析解== | | ==最简马尔科夫链下的解析解== |
| + | |
| + | 我们考虑一个最简单的2*2马尔科夫链矩阵: |
| + | |
| + | [math] P=\begin{pmatrix}p & 1-p \\1-q & q\end{pmatrix},[/math] |
| + | |
| + | 其中 [math]p[/math] 和 [math]q[/math] 为取值 [math]\[0,1\][/math] 的参数。 |
| + | |
| + | 这个参数为 [math]p[/math] 和 [math]q[/math] 的tpm 的 EI 可以通过以下解析解计算: |
| + | |
| + | [math] |
| + | |
| + | \begin{aligned} |
| + | |
| + | EI=&\frac{1}{2}\left[p\log_2\frac{2p}{1+p-q}+(1-p)\log_2\frac{2(1-p)}{1-p+q}\right.\\ |
| + | |
| + | &+\left.(1-q)\log_2\frac{2(1-q)}{1+p-q}+q\log_2\frac{2q}{1-p+q}\right], |
| + | |
| + | \end{aligned} |
| + | |
| + | [/math] |
| + | |
| + | |
| + | 下图展示了不同$p$和$q$取值的 EI 的变化。 |
| | | |
| ==计算EI的源代码== | | ==计算EI的源代码== |