Back to Glossary
Training

Epoch

An epoch represents one complete pass of the entire training dataset through a machine learning model during the training process. It's a measure of how many times the learning algorithm has seen the whole dataset.

Explanation

In training a machine learning model, especially deep learning models like neural networks, the dataset is often too large to process in one go. Therefore, the dataset is divided into smaller batches. An epoch signifies that the model has processed each batch in the entire dataset once. The number of epochs is a hyperparameter that controls how long the model trains. Too few epochs might result in underfitting, where the model doesn't learn the underlying patterns in the data. Too many epochs, on the other hand, can lead to overfitting, where the model learns the training data too well and performs poorly on unseen data (validation/test data). Monitoring the model's performance on a validation set during training helps determine the optimal number of epochs. Techniques like early stopping can be used to automatically halt training when the validation loss stops improving, preventing overfitting.

Related Terms