Logistic Regression_Squared error W3



Question 1:
Why 1/2 has been written inside the summation? as we kept on writing it outside, any specific reason? or is it just for simplicity in calculation?

Question 2:
What does “Loss function on a single training example” actually means here? as previously we did not name it as “loss” then why in logistic regression.

I`d be glad if you help me out in this concept

1 Like


  1. It is just okay to write it inside or outside. When we calculate, we put it outside.

  2. Our convention is to call it “loss” when we consider one sample - no summation sign and no 1/m. We call it “cost” when we consider more than one sample together - with the summation sign and 1/m.


1 Like

Thank you:) @rmwkwok

1 Like