Machine Learning, Deep Learning, Mathematics, Data Science, Neural Networks.
Y. When we need to predict the positive class (Y = 1), we will use Loss = -log(Y_pred) And when we need to predict the negative class (Y = 0), we will use Loss = -log(1-Y_pred) As you can see in the graphs. For the first function, when Y_pred is equal to 1, the Loss is equal to 0, which makes sense