1

Suppose we have some input variables and the output variable is categorical. So the output $G(X)$ can be in one of $k$ classes. Therefore an estimator $\hat{G}(X)$ will also be in one of these $k$ classes. Let $L$ be a $k \times k$ matrix with zeros on the diagonal and ones everywhere else. Let $L(k,l)$ be the price for classifying an observation that belongs to class $k$ as class $l$. The expected loss is $E(L(G(X), \hat{G}(X))$. This can be written as $$E(L(G(X), \hat{G}(X)) = E_{X} \sum_{k=1}^{K} L(G_{k}, \hat{G}(X))P(G_{k}|X)$$ or $$ \hat{G}(x) = \text{argmin}_{g \in G} \sum_{k=1}^{K} L(G_{k},g)P(G_{k}|X=x)$$

Question. Why is this equal to $$ \hat{G}(x) = \text{argmin}_{g \in G} \sum_{k=1}^{K} (1-P(g|X=x)?$$

I know that $$L(G_{k},g) = \begin{cases} 1 \ \ \text{if} \ G_{k} \neq g \\ 0 \ \ \text{if} \ G_{k} = g \end{cases}$$

optguy
  • 11

0 Answers0