Hints(Q3-HW5).pdf

Some Hints for question 3 of Homework 5
Behnam Gholami
In order to derive the update equations for the random variables zkj (k = 1, ..., K; j = 1, ..., N ), you need to
compute the values Eq(πk ) [log πk ] and Eq(πk ) [log(1 − πk )] that can be computed as
Eq(πk ) [log πk ] = ψ(a0πk ) − ψ(a0πk + b0πk ),
Eq(πk ) [log(1 − πk )] = ψ(b0πk ) − ψ(a0πk + b0πk ),
where a0πk and b0πk are defined in the update for πk and ψ is the digamma function which is defined as
ψ(x) ≡
d
ln Γ(x),
dx
where Γ(x) is the Gamma function, which is defined as
Z ∞
Γ(x) ≡
ux−1 e−u du.
0
Note: the command ”psi(.)” in MATLAB computes the digamma function (for more questions about the HW 5,
please email me at ”[email protected]”).
1