> For the complete documentation index, see [llms.txt](https://docs.binaexperts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.binaexperts.com/train/advanced-hyperparameter/patience.md).

# Patience

The term "patience" in the context of machine learning typically refers to the number of epochs to wait before terminating training if no improvement in the validation metric is observed. It is used in conjunction with techniques such as early stopping to prevent overfitting and improve the generalization of the model.

The value of "patience" is a hyperparameter that specifies the maximum number of epochs to continue training without improvement in the validation metric. The min and max values provided (0 and 100000, respectively) indicate the range within which the "patience" hyperparameter can be specified.

Here's what it means:

* A "patience" value of 0 means that the training will stop immediately if no improvement is observed after the first epoch.
* A "patience" value of 100000 means that the training will continue for a maximum of 100000 epochs even if no improvement is observed.

In practice, the value of "patience" is typically chosen based on experimentation and validation performance. It should strike a balance between allowing sufficient time for the model to learn meaningful patterns in the data and avoiding overfitting by stopping training when performance on the validation set starts to degrade.

A common approach is to start with a relatively small value for "patience" and gradually increase it if necessary. Values between 5 and 20 are often used as a starting point, but the optimal value may vary depending on the dataset, model architecture, and training objectives.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.binaexperts.com/train/advanced-hyperparameter/patience.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
