Hinge loss
Hinge loss is a classification loss that penalizes predictions whose signed margin falls below a specified threshold, typically increasing with the shortfall.
Math and Architectures of Deep Learning
A classification loss that is zero once a margin criterion is satisfied and increases only when incorrect classes score too close to or above the correct class.
- How it is used
- Uses classification scores to stop optimization once the correct class is sufficiently favored over incorrect classes.
- How deep it goes
- Defines the multiclass SVM formula, margin, and zero-versus-positive cases through score comparisons.
- Examples
- Uses cat, dog, airplane, and automobile scores to illustrate correct-versus-incorrect class comparisons and good or bad outputs.
- What you can do after
- Evaluate classification scores by identifying margin violations and recognizing when hinge loss becomes zero.
Read how Math and Architectures of Deep Learning explains hinge loss →
Machine Learning Algorithms in Depth
A hinge loss function penalizes classification examples whose signed margin falls below a specified threshold.
- How it is used
- Connects perceptron classification to stochastic-gradient optimization through a margin-based loss.
- How deep it goes
- Derives signed margins, nondifferentiability, subgradients, and parameter updates, stopping before a separate SVM treatment.
- Examples
- Uses an iris perceptron implementation and compares hinge loss with 0–1 loss and log-loss.
- What you can do after
- Apply it via stochastic gradient descent to understand and reproduce perceptron parameter updates.
Read how Machine Learning Algorithms in Depth explains hinge loss →
Also covered in
- Machines that ThinkIn early access (MEAP)
Related concepts
- cross entropy losscontrasts with · Cross-entropy loss measures the expected negative log probability that a predicted distribution assigns to outcomes drawn from a target distribution.
- marginhas part · In classification, a margin is a measure of separation between a decision boundary and data points, or of the correct class’s score advantage over competing classes.
Questions about hinge loss
What is hinge loss?
Hinge loss is a classification loss that penalizes predictions whose signed margin falls below a specified threshold, typically increasing with the shortfall.
Which Manning books explain hinge loss?
Math and Architectures of Deep Learning and Machine Learning Algorithms in Depth.
What is the difference between hinge loss and cross entropy loss?
Hinge loss is a classification loss that penalizes predictions whose signed margin falls below a specified threshold, typically increasing with the shortfall. Cross-entropy loss measures the expected negative log probability that a predicted distribution assigns to outcomes drawn from a target distribution.
What are the parts of hinge loss?
Hinge loss includes margin.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

