# 学习问题 - 非监督学习

已知O，求$$\lambda$$，使O的似然估计最大

**输入：**\
观测数据O\
**输出：** 隐马尔可夫模型参数

**过程：**\
1\. 初始化：

$$
\lambda(0) = (A(0), B(0), \pi(0))
$$

1.  递推 &#x20;

    $$
    \begin{aligned}
    a_{ij}^{(n+1)} = \frac{\sum_{t=1}^{T-1}\xi_t(i,j)}{\sum_{t=1}^{T-1}\gamma_t(i)}  \\
    b_j(k)^{(n+1)} = \frac{\sum_{t=1,O_t=v_k}^T\gamma_t(j)}{\sum_{t=1}^T\gamma_t(j)}  \\
    \pi_i^{(n+1)} = \gamma_1(i)
    \end{aligned}
    $$

    其中： &#x20;

    $$
    \begin{aligned}
    \gamma_t(i) = \frac{\alpha_t(i)\beta_t(i)}{\sum_{j=1}^N\alpha_t(i)\beta_t(i)}  \\
    \xi_t(i,j) = \frac{\alpha_t(i)a_{ij}b_j(o_{t+1})\beta_{t+1}(j)}{\sum_{i=1}^N\sum_{j=1}^N\alpha_t(i)a_{ij}b_j(o_{t+1})\beta_{t+1}(j)}
    \end{aligned}
    $$
2.  终止： &#x20;

    $$
    \lambda(N+1) = (A(N+1), B(N+1), \pi(N+1))
    $$
