1 Answers
In machine learning, the hinge loss is a loss function used for training classifiers. The hinge loss is used for "maximum-margin" classification, most notably for support vector machines.
For an intended output t = ±1 and a classifier score y, the hinge loss of the prediction y is defined as
Note that y {\displaystyle y} should be the "raw" output of the classifier's decision function, not the predicted class label. For instance, in linear SVMs, y = w ⋅ x + b {\displaystyle y=\mathbf {w} \cdot \mathbf {x} +b} , where {\displaystyle } are the parameters of the hyperplane and x {\displaystyle \mathbf {x} } is the input variable.
When t and y have the same sign and | y | ≥ 1 {\displaystyle |y|\geq 1} , the hinge loss ℓ = 0 {\displaystyle \ell =0}. When they have opposite signs, ℓ {\displaystyle \ell } increases linearly with y, and similarly if | y | < 1 {\displaystyle |y|<1} , even if it has the same sign.