hinge loss
In plain wordsA way of scoring a classifier's mistakes that charges nothing for answers that are right with room to spare, and charges more and more the further an answer falls on the wrong side.
A loss functionloss function, n.: A score that measures how wrong a model's predictions are. Training means adjusting the model, step by step, to push this number down. for classification with labels y ∈ {−1, +1} and a real-valued score f(x), defined as max(0, 1 − y·f(x)). It is zero for examples classified correctly with a marginmargin, n.: How far, and on which side, an example lies from a classifier's dividing line. A wide gap between the line and the nearest examples suggests the classifier will handle new data well. of at least 1 and grows linearly as the margin shrinks or turns negative, so easy examples contribute nothing — which is why only support vectors shape a support vector machinesupport vector machine, n.: A classic method that separates two groups of examples with the widest possible gap — like laying the broadest possible road between them. A mathematical shortcut lets it draw curved boundaries too., whose training objective is the hinge loss plus an L2 penalty. The loss is convex, allowing efficient optimization, but not differentiable at the hinge point, so subgradient methods or smoothed variants are used. It is a convex upper bound on the 0–1 classification error but, unlike log losslog loss, n.: A score for probability predictions that punishes confident mistakes severely: saying '99% sure' and being wrong costs far more than saying '60% sure' and being wrong. Lower is better., does not yield probability estimates. Multiclass versions (Weston–Watkins, Crammer–Singer) penalize the gap between the true class's score and the others'; the squared hinge penalizes violations quadratically.
With hinge loss the model stops pushing on examples once they clear the margin, unlike with cross-entropy.
Origin
The loss is implicit in the soft-margin support vector machine of Corinna Cortes and Vladimir Vapnik (1995). Its name describes its graph — flat at zero, then bending at a single point into a rising straight line. An early use of the name is Claudio Gentile and Manfred Warmuth's 'Linear Hinge Loss and Average Margin' (NIPS 1998), and it was in general use in statistical learning theory by the early 2000s.
Related
- support vector machinesupport vector machine, n.: A classic method that separates two groups of examples with the widest possible gap — like laying the broadest possible road between them. A mathematical shortcut lets it draw curved boundaries too.
- marginmargin, n.: How far, and on which side, an example lies from a classifier's dividing line. A wide gap between the line and the nearest examples suggests the classifier will handle new data well.
- loss functionloss function, n.: A score that measures how wrong a model's predictions are. Training means adjusting the model, step by step, to push this number down.
- log losslog loss, n.: A score for probability predictions that punishes confident mistakes severely: saying '99% sure' and being wrong costs far more than saying '60% sure' and being wrong. Lower is better.
- regularizationregularization, n.: Any technique that stops a model from memorizing its training examples too closely — often by penalizing complexity — so that it works better on new data.
- classificationclassification, n.: Sorting things into categories — spam or not spam, which animal is in a photo, which language a text is written in — by learning from examples that are already labeled.
- log losslog loss, n.: A score for probability predictions that punishes confident mistakes severely: saying '99% sure' and being wrong costs far more than saying '60% sure' and being wrong. Lower is better.
Mentioned in
loss functionloss function, n.: A score that measures how wrong a model's predictions are. Training means adjusting the model, step by step, to push this number down., empirical risk minimizationempirical risk minimization, n.: The basic recipe of most machine learning: from the models on offer, pick the one with the smallest errors on the training examples, trusting that score as a guide to how it will do on new data., marginmargin, n.: How far, and on which side, an example lies from a classifier's dividing line. A wide gap between the line and the nearest examples suggests the classifier will handle new data well., support vector machinesupport vector machine, n.: A classic method that separates two groups of examples with the widest possible gap — like laying the broadest possible road between them. A mathematical shortcut lets it draw curved boundaries too.