AI engineering glossary · Classical ML algorithms

What is hinge loss?

Hinge loss: A loss function for margin classifiers: max(0, 1 - y * f(x)), where y is +1 or -1 and f(x) is the raw score. It is zero for points correctly classified beyond the margin and grows linearly for points inside it or misclassified.

Level: intermediateTopic: Classical ML algorithms

Hinge loss: an example

A positive example (y=+1) with score 0.3 has loss 0.7; with score 1.5 it has loss 0.

Related terms

More Classical ML algorithms terms

Where you learn it

Hinge loss is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.