Skip to content

desmondyeoh/wavy-cost-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Why Not to Use "squared error cost function" for Logistic Regression

In Andrew Ng's Machine Learning course in Coursera, Andrew mentioned that using we should use logistic cost function instead of the squared error cost function used in linear regression. This is because squared error cost function will cause a lot of wavy-like cost function, which will have a lot of local optimums. He said that the wavy-like property is due to the non-linear sigmoid function used in the logistic regression hypothesis h. And, why this matters is because, having multiple local minima in cost function is bad for gradient descent as it's harder to find the global minimum.

Img Screenshot from the Coursera Machine Learning course

The Jupyter notebook proves that that using squared error cost function for logistic regression will indeed cause non-convex wavy-like cost function.

About

Why Not to Use "squared error cost function" for Logistic Regression

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors