Dan | Machine Learning Engineer
Dan | Machine Learning Engineer

@DanKornas

9 Tweets Dec 07, 2022
πŸ€– What is Overfitting In Machine Learning? πŸ€”
A statistical model is said to be overfitted when we feed it a lot more data than necessary. To make it relatable, imagine trying to fit into oversized apparel.
When a model fits more data than it actually needs, it starts catching the noisy data and inaccurate values in the data. As a result, the efficiency and accuracy of the model decrease.
In an example of simple linear regression, training the data is all about finding out the minimum cost between the best fit line and the data points.
It goes through a number of iterations to find out the optimum best fit, minimizing the cost. This is where overfitting comes into the picture.
The line seen in the image above can give a very efficient outcome for a new data point. In the case of overfitting, when we run the training algorithm on the data set, we allow the cost to reduce with each number of iteration.
Running this algorithm for too long will mean a reduced cost but it will also fit the noisy data from the data set. The result would look something like in the graph below.
This might look efficient but isn’t really. The main goal of an algorithm such as linear regression is to find a dominant trend and fit the data points accordingly.
But in this case, the line fits all data points, which is irrelevant to the efficiency of the model in predicting optimum outcomes for new entry data points.
If you liked this thread, be sure to share it with everyone! πŸš€
If you're interested in:
🐍 Python
🌐 Artificial Intelligence
πŸ€– Machine Learning
πŸ“Š Data Science
βš™οΈ MLOps
Be sure to follow me to learn more about becoming an AI Engineerβœ”οΈ

Loading suggestions...