My question is regarding the LR cost function from andrews ML course (http://feature-space.com/en/document50.pdf , page -5)
$cost= \frac{1}{m}[ -y \times \log(\psi) - (1-y) \times \log(\kappa) ]$
The vector y holds values for the digits (1-10), so if we plug these values in the cost function then the cost function takes ambiguous values. For instance if y=5, then the cost function will have both the parameters
$cost (y=4) = \frac{1}{m} [ -4 \times \log(\psi) -(1+4) \times \log(\kappa) ]$
As per Andrew's lecture I remember him saying that only one of the log terms would remain inside the cost function as if classified correct $\log(\psi)$ term remains else $\log(\kappa)$ remains.
Please help me where I'm getting it wrong.