Member-only story
How to overcome overfitting in your ML model?

Overfitting can occur due to different reasons. There are some ways to prevent this and improve your model. Some of them are:
- Perform early stopping
Early stopping is one of the effective methods to try when you notice that the validation loss increases while training loss decreases. Remember that to perform early stopping you might need to divide your dataset into train, test, and cross-validation sets. - Do Regularization
Sometimes regularization is necessary because your model might be suffering from overfitting. In such a case adding the regularization term in your loss function prevents your model to learn complex functions from the data. This happens when your data contains some noise and your model also tries to fit the noise. The consequence is that it will fit the training data perfectly but will fail to generalize the unseen data. - Add more dataset
It might happen that your model is being overfitted because it has fewer data. For example, a model can easily memorize a set of small data. To prevent this, you will need to feed more data into your machine learning system. - Perform feature selection
Feature selection is one of the careful steps of designing a machine learning system. An ML model is just a mathematical relationship that maps input x into output y. So if we add useless…