Overfitting and Underfitting

Overfitting occurs when a model learns the noise in the training data, resulting in poor performance on unseen data. Underfitting occurs when a model is too simple to capture the underlying patterns in the data, leading to low accuracy on both training and test data. The goal in machine learning is to find a balance between overfitting and underfitting, achieving good generalization to unseen data.