asadoughi/stat-learning

Chapter 4 - Exercise 2

Closed this issue · 0 comments

I think the answer you gave is confusing and didn't explain the purpose of doing the transformation.
Actually the reason why you should find the $k$th class that will maximize $\delta_{k}(x)$ is due to the Bayes Theorem.
From the Bayes' Theorem(4.12) we know , for any class $k$, the total probability $\sum\limits_{l=1}^{K} \pi_{l} f_{l}(x)$ for each $p_{k}(x)$ is the same.
However, the prior probability $\pi_{k}$ and the probability $f_{k}(x)$ will differ depending on it's $k$.
So, the objective is to find the largest $\pi_{k}f_{k}(x)$ among the range of $(\pi_{1}f_{1}(x),\dots,\pi_{k}f_{k}(x), \dots,\pi_{K}f_{K}(x))$. This will lead us to find the largest $p_{k}(x)$
With the logarithm transformation we get $\delta_{k}(x) = \log \big(\pi_{k}f_{k}(x)\big)$.
In the end finding the largest $\delta_{k}(x)$ among $K$ classes is equivalent to find the largest $p_{k}(x)$ among $K$ classes. But the computation for $\delta_{k}(x)$ is much easier than $p_{k}(x)$.