Use of hinge loss instead of log loss

Hello everyone,

In the 8th screen “representing neural networks” mission (Learn data science with Python and R projects), it is claimed that we fit the logistic regression model. However, when we call “SGDClassifier()” the original loss function is “hinge” that corresponds to SVM classifiers, and not to logistic regression. When I used “SGDClassifier(loss=‘log’)” that corresponds to log loss function (logistic regression), the answer(log_predictions) was not correct at 2 points out of 100. So, we basically need to train SVM model instead of logistic regression to obtain the correct answer.

Did I understand everything correctly and the answer should be a bit modified by Dataquest developers or did I misunderstand anything?

From a quick look, I think you’re right. The answer should use log, not hinge.


Thank you, @Bruno for verifying my concern!