> For the complete documentation index, see [llms.txt](https://sisyphus.gitbook.io/project/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sisyphus.gitbook.io/project/deep-learning-basics/basics/hinge-loss.md).

# Hinge Loss

## Hinge loss (SVM loss)

1. **Definition:** The correct score should be larger than a margin (1, and the 1 here actually can be arbitrary) than wrong scores&#x20;
2. **Min** 0, **Max** infinity
3. **At the initial time**, every class scores should be similar and the expected loss is C-1 ( each wrong class has loss 1, and there are C - 1 wrong classes)
4. **Squared hinge loss** is different from hinge loss, squared loss focusing more on the bad cases, a small difference may have huge loss value at the end.

![](/files/-LP81K9GYzvQS2CN4oEW)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sisyphus.gitbook.io/project/deep-learning-basics/basics/hinge-loss.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
