In plain words, what does the hinge loss punish in a classifier, and what is the loss for a point with correct label +1 when the model's score for it is 0.5?

Supervised learning, Hinge loss
Level L1 Beginner. Length Short. Nature Th+Mat Both.

What's being asked

Whether you see that hinge loss asks for a safety margin, not just the right sign, and can apply the rule once.

Key idea

The classifier gives each point a score. For a label y=+1 or −1, the margin is m=y×score: positive when the point is on the correct side, larger when it is further from the boundary. Hinge loss is max⁡(0, 1−m): zero once the margin is at least 1, and growing steadily as the margin falls below 1.

Steps

  1. Think of the score as a confidence. Multiply it by the true label (+1 or −1) to get the margin m. A positive margin means the point is on the correct side.
  2. Hinge loss is max⁡(0, 1−m). A point that is correct with room to spare (m≥1) costs nothing. A point that is right but too close to the boundary (0<m<1) is still charged a little. A wrong point (m<0) is charged more than 1.
  3. Our example: y=+1 and score 0.5 give m=0.5, so the loss is 1−0.5=0.5. The point is on the correct side but not by enough, so it is still charged.
  4. This "safety margin" idea is why hinge loss is used to train support vector machines (SVMs): they want points far from the boundary, not merely on the right side.

Common mistakes

How long your answer should be

3–4 sentences, about 1 minute.

Read this

Previous in Supervised learning: What is the difference between bagging and boosting, in one sentence?
Next in Supervised learning: In a soft-margin support vector machine (SVM), what does the hyperparameter C control?