1
$\begingroup$

Can anyone show me step by step, how to derive this equation, and the formulas used? Maybe the author uses Bayes' Theorem but I cannot find how...

$P(z_k | d_i,w_j) = \frac{P(w_j,z_k|d_i)}{P(w_j|d_i)} = \frac{P(w_j|z_k,d_i)P(z_k|d_i)}{\sum_{i=1}^M P(w_j|z_i,d_i)P(z_i|d_i)}$

1 Answers 1

1

The first equality uses $$ P(A, B \mid C) = P(A \mid B, C) \cdot P(B \mid C) \tag{$\spadesuit$} $$ More specifically, $$ P(z_k, w_j \mid d_i) = P(z_k \mid w_j, d_i) \cdot P(w_j \mid d_i) \implies P(z_k \mid w_j, d_i) = \frac{P(z_k, w_j \mid d_i)}{P(w_j \mid d_i)} $$ For the second equality, by $(\spadesuit)$, we have first $$ P(w_j, z_k \mid d_i) = P(w_j \mid z_k, d_i) \cdot P(z_k \mid d_i) $$ and by law of total probability, $$ P(w_j \mid d_i) = \sum_{k = 1}^M P(w_j, z_k \mid d_i) = \sum_{k=1}^M P(w_j \mid z_k, d_i) \cdot P(z_k \mid d_i) $$

  • 0
    where it comes from the equation ($\spadesuit$)?2017-02-10
  • 0
    and another question is why the $d_i$ in $P(w_j|z_k,d_i)$ and $P(w_j|z_i,d_i)$ can be delete?2017-02-10
  • 0
    $P(AB|C) = \frac{P(ABC)}{P(C)}$ and $P(A|BC)P(B|C) = \frac{P(ABC)}{P(BC)} \times \frac{P(BC)}{P(C)} = \frac{P(ABC)}{P(C)}.$2017-02-11