0
$\begingroup$

So I'm reading Python Machine Learning by Sebastian Raschka, but I'm getting a little lost on an equation that appears multiple times in the book in two different forms.

Here it is with (y) and (1-y) as indicator functions: enter image description here

It then appears in this form with the initial (y) indicator missing. Where did it go?? Is it not important? My intuition tells me it needs to stay in the equation. enter image description here

Lastly, here it is with an l2 penalty: << cannot post more than 2 links. sorry >>

Can anyone help explain this discrepancy? What am I not understanding?

$\endgroup$
1
  • 1
    $\begingroup$ The second image looks like $y^{(i)}$ was lost through a typographical error. $\endgroup$
    – whuber
    Commented Mar 28, 2017 at 17:03

2 Answers 2

2
$\begingroup$

The $J$ seems to be an estimate of (a factor of the) the cross entropy term. So, you are right a $y^{(i)}$ is missing.

$\endgroup$
0
$\begingroup$

Yes it is in fact an error. I have the same book but the section now reads as the picture below. enter image description here

You can also note in the prior section he's maximizing a likelihood function. He then moves to minimizing a log-likelihood function. As you can see in this picture the y(i) term is in the exponent. When he takes the log it moves to the front, thus the y(i) should be there.enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.