Logistic loss function for second term

How did he get this curve for -log(1-f) ? (the part in purple). I am stuck with the math even if I now logs and all, it is just this step (where there is the assumption that this is obvious but I do not see why). Picture below.

That is the term for the case that the label is 0, meaning that’s what you want the prediction to be. Well, suppose the prediction is as wrong as it could possibly be and we have f = 1, then what is the value of -log(1 - f)? It will be -log(0), right? Which is \infty, since log(0) = -\infty.

Now suppose the prediction is exactly correct and f = 0, then we get the loss -log(1 - 0) = -log(1) = 0.

The curve starts at 0 for f = 0 and increases to \infty at f = 1. You’d have to plot a few points in between to confirm the shape of the curve.

1 Like

Thank you