What is hinge loss?
The loss behind support vector machines: max(0, 1 − y·f(x)) with labels y = ±1 and raw score f(x). It is zero for points on the correct side of the margin and grows linearly as a point moves into the margin or past the boundary.
The loss behind support vector machines: max(0, 1 − y·f(x)) with labels y = ±1 and raw score f(x). It is zero for points on the correct side of the margin and grows linearly as a point moves into the margin or past the boundary.
Card 1 of 259. Answer: The loss behind support vector machines: max(0, 1 − y·f(x)) with labels y = ±1 and raw score f(x). It is zero for points on the correct side of the margin and grows linearly as a point moves into the margin or past the boundary.
About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.
Hinge loss asks for more than a correct sign: it wants y·f(x) ≥ 1, a margin of safety. Points beyond the margin contribute nothing, so only the points on or inside it, the support vectors, shape the solution. A linear SVM minimizes hinge loss plus an L2 penalty on the weights.
Example with y = +1: a score of 2.5 costs 0; a score of 0.4 is on the right side but inside the margin and costs 0.6; a score of −1 is misclassified and costs 2. Log loss, by contrast, never reaches zero, so it keeps nudging even confident, correct points.
Follow-ups: hinge loss isn't differentiable at the margin, so solvers use subgradients or the dual problem; it produces scores, not probabilities, so an SVM needs Platt scaling for those; and variants include the squared hinge and the multi-class hinge of Crammer and Singer. Its flat region is also why SVMs ignore well-classified outliers but are pulled by mislabeled points near the boundary.