0

In Introduction to Statistical Learning the classifier function of QDA is given by:
$$\delta_k(x)=\frac{1}{2}(x-\mu_k)^T\Sigma_k^{-1}(x-\mu_k)-\frac{1}{2}log|\Sigma_k|+log\pi_k$$ But, by simple calculations like in this question we can find out that $$p_k(x) = \frac{\pi_k\frac{1}{(2\pi_k)^{p/2}|\Sigma_k|^{1/2}}exp(-\frac{1}{2}(x-\mu_k)^T\Sigma^{-1}_k(x-\mu_k))}{\sum_{l=1}^K\pi_l\frac{1}{(2\pi_l)^{p/2}|\Sigma_k|^{1/2}}exp(-\frac{1}{2}(x-\mu_l)^T\Sigma_k^{-1}(x-\mu_l))}$$ And we know that the denominator of this expression is a constant, and we can't cancel the denominator of the numerator of this expression(i.e.$(2\pi_k)^{p/2}|\Sigma_k|^{1/2}$). So taking the log of both the sides and removing the denominator, we have : $$\delta_k(x)= -\frac{(p-2)}{2}log\pi_k-\frac{1}{2}log|\Sigma_k|-\frac{1}{2}(x-\mu_k)\Sigma_k^{-1}(x-\mu_k)$$ That is, the coefficient of $log\pi_k$ is different in both equations. So am I doing something wrong here? Is this done on purpose?

Mooncrater
  • 787
  • 2
  • 9
  • 20
  • 1
    I think you are confusing $\pi_k$ with the number $\pi$; the $(2\pi_k)^{p/2}$ you have in the denominator of the numerator should be $(2\pi)^{p/2}$ and, given that, you can easily see that $\log \pi_k$ is indeed the correct form of that term in the top expression. – jbowman Aug 02 '17 at 17:05
  • Ohh. I really missed that even though that difference is explicitly stated in the book. Thanks @jbowman ! – Mooncrater Aug 03 '17 at 15:13

0 Answers0