Derivative of multivariate Gaussian PDF with respect to covariance

1k Views Asked by At

While trying to derive the M-step of the EM-algorithm for a mixture of Gaussians, I came across this derivative, which I have no idea how to deal with:

$$ \frac{\partial}{\partial \mathbf{\Sigma_k}} \left ( (2\pi)^{-d/2}|\mathbf{\Sigma_k}|^{-1/2}e^{-\frac{1}{2}(x-\mathbf{\mu_k})^T\mathbf{\Sigma_k}^{-1}(x-\mathbf{\mu_k})}\right ) $$

Basically, this the derivative of the multivariate Gaussian PDF with respect to the covariance matrix. My matrix calculus is not very good - how do I approach this?

I've computed the derivative of the logarithm of this PDF before and that was a bit easier because the $|\mathbf{\Sigma_k}|$ and $\mathbf{\Sigma_k}^{-1}$ were in two separate terms that were added/subtracted. But here they are in two terms that are multiplied together.

1

There are 1 best solutions below

0
On

I've found the answer and I'm posting it for posterity. I mentioned in the question that computing the derivative of the logarithm of the PDF was easier. It turns out that this can be used to compute the derivative of the PDF itself:

$$ \frac{\partial \ln (f)}{\partial \mathbf{\Sigma}_k} = \frac{1}{f} \frac{\partial f}{\partial \mathbf{\Sigma}_k}\\ \Rightarrow \frac{\partial f}{\partial \mathbf{\Sigma}_k} = f \cdot\frac{\partial \ln (f)}{\partial \mathbf{\Sigma}_k} $$

Also, it turns out that taking the derivative of the PDF with respect to $\mathbf{\Sigma}^{-1}$ is easier and leads to the same answer.