# Underfitting and overfitting

Both underfitting and overfitting lead to poor predictions on new data sets.

Underfitting occurs when the machine learning algorithm cannot capture the underlying trend of the data. It occurs when the model or the algorithm does not fit the data well.

Underfitting occurs if the model or algorithm shows low variance but high bias. It is often a result of an excessively simple model.

To address underfitting:

- Increase model capacity
- Reduce regularization
- Error analysis
- Choose a more advanced architecture
- Tune hyperparameters
- Add features

Overfitting happens when a machine learning algorithm captures the noise of the data. It occurs when the model or the algorithm fits the data too well. Overfitting occurs if the model or algorithm shows low bias but high variance. It is often a result of an excessively complicated model.

To address overfitting:

- Add more training data
- Add regularization
- Add data augmentation
- Error analysis
- Tune hyperparameters
- Reduce model size