Error function :

Hello sir,
Why did we take the negative of the log likelihood as the error function?

Hey Abishek,
As discussed in the video we have log likelihood, which we have to maximize to get the optimal theta values. But in Machine Learning we always find a cost function that we minimize, in logistic regression case since we want to maximize the log likelihood, can we say that take the negative of log likelihood, treat it like a cost function and thus minimize it using gradient descent.
So basically to form a cost function we put negative sign before the log likelihood.

I hope this clears your doubts
Thanks :slight_smile:

1 Like

Hello Sir,
Thanks for the response…I got it!