I have the following equation obtained from one of the models.
$\mathcal{H} = \sum\limits_{D} \sum\limits_{W}n(d,w)\sum\limits_{Z} p(z|d,w)[\log{p(d)}+\log{p(z|d)}+\log{p(w|z)]}$
I need to take partial derivatives w.r.t $p(d)$, $p(w|z)$, and $p(z|d)$. The solution to the partial derivatives are as follows:
\begin{equation} \cfrac{\partial\mathcal{H}}{\partial p(w|z)} = \sum\limits_{D}n(d,w) \cfrac{p(z|w,d)}{p(w|z)} \end{equation} \begin{equation} \cfrac{\partial\mathcal{H}}{\partial p(z|d)} = \sum\limits_{W}n(d,w) \cfrac{p(z|w,d)}{p(z|d)} \end{equation} \begin{equation} \cfrac{\partial\mathcal{H}}{\partial p(d)} = \sum\limits_{W}\sum\limits_{Z}n(d,w) \cfrac{p(z|w,d)}{p(d)} \end{equation}
I am not a mathematics student, but I remember the basics of derivatives and partial derivatives. In the above solution, I am not able to understand how the summations got eliminated. It will be great if some one can help me by providing an example of how to solve one of the above partial derivates; since, the rest must follow the same methodology.